@@ -14,10 +14,10 @@ test('Utils.getDepthForSize', () => {
1414} )
1515
1616test ( 'Utils.getAmountForDuration' , ( ) => {
17- expect ( Utils . getAmountForDuration ( Duration . fromHours ( 25 ) , 24000 , 5 ) ) . toBe ( ( 414720000n / 24n ) * 25n )
18- expect ( Utils . getAmountForDuration ( Duration . fromDays ( 1 ) , 24000 , 5 ) ) . toBe ( 414720000n )
19- expect ( Utils . getAmountForDuration ( Duration . fromWeeks ( 1 ) , 24000 , 5 ) ) . toBe ( 414720000n * 7n )
20- expect ( Utils . getAmountForDuration ( Duration . fromYears ( 1 ) , 24000 , 5 ) ) . toBe ( 414720000n * 365n )
17+ expect ( Utils . getAmountForDuration ( Duration . fromHours ( 25 ) , 24000 , 5 ) ) . toBe ( ( 414720000n / 24n ) * 25n + 1n )
18+ expect ( Utils . getAmountForDuration ( Duration . fromDays ( 1 ) , 24000 , 5 ) ) . toBe ( 414720000n + 1n )
19+ expect ( Utils . getAmountForDuration ( Duration . fromWeeks ( 1 ) , 24000 , 5 ) ) . toBe ( 414720000n * 7n + 1n )
20+ expect ( Utils . getAmountForDuration ( Duration . fromYears ( 1 ) , 24000 , 5 ) ) . toBe ( 414720000n * 365n + 1n )
2121} )
2222
2323test ( 'bee.getStorageCost' , async ( ) => {
@@ -61,7 +61,7 @@ test('bee.getExtensionCost', async () => {
6161 Size . fromGigabytes ( 18 ) ,
6262 Duration . fromYears ( 1 ) ,
6363 )
64- expect ( cost . toDecimalString ( ) ) . toBe ( '209.0182760562950144 ' )
64+ expect ( cost . toDecimalString ( ) ) . toBe ( '209.0182760579727360 ' )
6565 } )
6666} )
6767
@@ -80,23 +80,23 @@ test('bee.buyStorage with extensions', async () => {
8080 // create stamp
8181 'GET /chainstate' ,
8282 'GET /chainstate' ,
83- 'POST /stamps/458922240 /22' ,
83+ 'POST /stamps/458922241 /22' ,
8484 'GET /stamps/b330000000000000000000000000000000000000000000000000000000000000' ,
8585 // create stamp, do not wait for usable
8686 'GET /chainstate' ,
8787 'GET /chainstate' ,
88- 'POST /stamps/458922240 /22' ,
88+ 'POST /stamps/458922241 /22' ,
8989 // extend duration
9090 'GET /stamps/b330000000000000000000000000000000000000000000000000000000000000' ,
9191 'GET /chainstate' ,
92- 'PATCH /stamps/topup/b330000000000000000000000000000000000000000000000000000000000000/458922240 ' ,
92+ 'PATCH /stamps/topup/b330000000000000000000000000000000000000000000000000000000000000/458922241 ' ,
9393 // extend size +1 depth
9494 'GET /stamps/b330000000000000000000000000000000000000000000000000000000000000' ,
95- 'PATCH /stamps/topup/b330000000000000000000000000000000000000000000000000000000000000/458922240 ' ,
95+ 'PATCH /stamps/topup/b330000000000000000000000000000000000000000000000000000000000000/458922241 ' ,
9696 'PATCH /stamps/dilute/b330000000000000000000000000000000000000000000000000000000000000/23' ,
9797 // extend size +2 depth
9898 'GET /stamps/b330000000000000000000000000000000000000000000000000000000000000' ,
99- 'PATCH /stamps/topup/b330000000000000000000000000000000000000000000000000000000000000/917844480 ' ,
99+ 'PATCH /stamps/topup/b330000000000000000000000000000000000000000000000000000000000000/917844481 ' ,
100100 'PATCH /stamps/dilute/b330000000000000000000000000000000000000000000000000000000000000/24' ,
101101 // error case
102102 'GET /stamps/b330000000000000000000000000000000000000000000000000000000000000' ,
0 commit comments