@@ -27,6 +27,8 @@ import (
27
27
sr "gno.land/r/gnoswap/v1/staker"
28
28
)
29
29
30
+ //! TODO: may need to change deadline param in `ExactInSwapRoute` function
31
+
30
32
var (
31
33
launchpadProject01Addr = testutils.TestAddress("launchpadProject01")
32
34
launchpadProject01Realm = std.NewUserRealm(launchpadProject01Addr)
@@ -143,7 +145,7 @@ func testMint(t *testing.T) {
143
145
func testStakeToken(t *testing.T) {
144
146
t.Run("stake token", func(t *testing.T) {
145
147
std.TestSetRealm(adminRealm)
146
- gnft.Approve(a2u( consts.STAKER_ADDR) , "1")
148
+ gnft.Approve(consts.STAKER_ADDR, "1")
147
149
148
150
sr.StakeToken(1)
149
151
@@ -296,6 +298,7 @@ func testSwapRoute(t *testing.T) {
296
298
"gno.land/r/onbloc/bar:gno.land/r/onbloc/foo:500",
297
299
"100",
298
300
"1",
301
+ time.Now().Unix(),
299
302
)
300
303
uassert.Equal(t, amountIn, "100000")
301
304
uassert.Equal(t, amountOut, "-99800")
@@ -321,6 +324,7 @@ func testSwapRoute(t *testing.T) {
321
324
"gno.land/r/onbloc/baz:gno.land/r/onbloc/bar:500",
322
325
"100",
323
326
"1",
327
+ time.Now().Unix(),
324
328
)
325
329
uassert.Equal(t, amountIn, "100000")
326
330
uassert.Equal(t, amountOut, "-99800")
@@ -348,6 +352,7 @@ func testSwapRoute(t *testing.T) {
348
352
"gno.land/r/gnoswap/v1/gns:gno.land/r/demo/wugnot:3000",
349
353
"100",
350
354
"1",
355
+ time.Now().Unix(),
351
356
)
352
357
uassert.Equal(t, amountIn, "100000")
353
358
uassert.Equal(t, amountOut, "-99550")
@@ -411,8 +416,7 @@ func testCheckReward(t *testing.T) {
411
416
412
417
func checkProtocolFeeBalance() {
413
418
println("[START] checkProtocolFeeBalance")
414
- pfRegistered := pf.GetRegisteredTokens()
415
- for _, token := range pfRegistered {
419
+ for _, token := range common.ListRegisteredTokens() {
416
420
balance := common.BalanceOf(token, consts.PROTOCOL_FEE_ADDR)
417
421
if balance != 0 {
418
422
println("token", token)
0 commit comments