@@ -46,8 +46,8 @@ describe('AccountStore', () => {
46
46
} ) ;
47
47
48
48
it ( 'should return sorted accounts' , async ( ) => {
49
- const a = new Account ( rootStore , { ...poolInitAccount , value : 300 } ) ;
50
- const b = new Account ( rootStore , { ...poolInitAccount , value : 100 } ) ;
49
+ const a = new Account ( rootStore , { ...poolInitAccount , value : ' 300' } ) ;
50
+ const b = new Account ( rootStore , { ...poolInitAccount , value : ' 100' } ) ;
51
51
const c = new Account ( rootStore , {
52
52
...poolInitAccount ,
53
53
expirationHeight : 5000 ,
@@ -76,8 +76,8 @@ describe('AccountStore', () => {
76
76
} ) ;
77
77
78
78
it ( 'should excluded closed accounts in sorted accounts' , async ( ) => {
79
- const a = new Account ( rootStore , { ...poolInitAccount , value : 300 } ) ;
80
- const b = new Account ( rootStore , { ...poolInitAccount , value : 100 } ) ;
79
+ const a = new Account ( rootStore , { ...poolInitAccount , value : ' 300' } ) ;
80
+ const b = new Account ( rootStore , { ...poolInitAccount , value : ' 100' } ) ;
81
81
const c = new Account ( rootStore , {
82
82
...poolInitAccount ,
83
83
expirationHeight : 5000 ,
@@ -158,7 +158,7 @@ describe('AccountStore', () => {
158
158
159
159
it ( 'should create a new Account' , async ( ) => {
160
160
expect ( store . accounts . size ) . toEqual ( 0 ) ;
161
- await store . createAccount ( 3000000 , 4032 ) ;
161
+ await store . createAccount ( Big ( 3000000 ) , 4032 ) ;
162
162
expect ( store . accounts . size ) . toEqual ( 1 ) ;
163
163
expect ( store . activeAccount ) . toBeDefined ( ) ;
164
164
} ) ;
@@ -168,7 +168,7 @@ describe('AccountStore', () => {
168
168
throw new Error ( 'test-err' ) ;
169
169
} ) ;
170
170
expect ( rootStore . appView . alerts . size ) . toBe ( 0 ) ;
171
- await store . createAccount ( 3000000 , 4032 ) ;
171
+ await store . createAccount ( Big ( 3000000 ) , 4032 ) ;
172
172
await waitFor ( ( ) => {
173
173
expect ( rootStore . appView . alerts . size ) . toBe ( 1 ) ;
174
174
expect ( values ( rootStore . appView . alerts ) [ 0 ] . message ) . toBe ( 'test-err' ) ;
@@ -216,7 +216,9 @@ describe('AccountStore', () => {
216
216
it ( 'should deposit funds into an account' , async ( ) => {
217
217
await store . fetchAccounts ( ) ;
218
218
const txid = await store . deposit ( 1 ) ;
219
- expect ( + store . activeAccount . totalBalance ) . toBe ( poolDepositAccount . account ?. value ) ;
219
+ expect ( store . activeAccount . totalBalance . toString ( ) ) . toBe (
220
+ poolDepositAccount . account ?. value ,
221
+ ) ;
220
222
expect ( txid ) . toEqual ( poolDepositAccount . depositTxid ) ;
221
223
} ) ;
222
224
@@ -236,7 +238,9 @@ describe('AccountStore', () => {
236
238
it ( 'should withdraw funds from an account' , async ( ) => {
237
239
await store . fetchAccounts ( ) ;
238
240
const txid = await store . withdraw ( 1 ) ;
239
- expect ( + store . activeAccount . totalBalance ) . toBe ( poolWithdrawAccount . account ?. value ) ;
241
+ expect ( store . activeAccount . totalBalance . toString ( ) ) . toBe (
242
+ poolWithdrawAccount . account ?. value ,
243
+ ) ;
240
244
expect ( txid ) . toEqual ( poolWithdrawAccount . withdrawTxid ) ;
241
245
} ) ;
242
246
0 commit comments