Skip to content

Commit

Permalink
Wait for mint in test
Browse files Browse the repository at this point in the history
  • Loading branch information
xssnick committed Mar 25, 2024
1 parent 89a9ea1 commit 63730d5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ton/nft/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,17 @@ func Test_NftMintTransfer(t *testing.T) {
fmt.Println("Minting NFT...")
mint := wallet.SimpleMessage(collectionAddr, tlb.MustFromTON("0.025"), mintData)

err = w.Send(ctx, mint, true)
_, block, err = w.SendWaitTransaction(context.Background(), mint)
if err != nil {
t.Fatal("Send err:", err.Error())
}

// wait next block to be sure everything updated
block, err = api.WaitForBlock(block.SeqNo + 5).GetMasterchainInfo(ctx)
if err != nil {
t.Fatal("Wait master err:", err.Error())
}

fmt.Println("Minted NFT:", nftAddr.String(), 0)

newAddr := address.MustParseAddr("EQB9ElEc88x6kOZytvUp0_18U-W1V-lBdvPcZ-BXdBWVrmeA") // address wallet with other seed = ("together ... lounge")
Expand All @@ -109,7 +115,7 @@ func Test_NftMintTransfer(t *testing.T) {
}

// wait next block to be sure everything updated
block, err = api.WaitForBlock(block.SeqNo + 7).GetMasterchainInfo(ctx)
block, err = api.WaitForBlock(block.SeqNo + 5).GetMasterchainInfo(ctx)
if err != nil {
t.Fatal("Wait master err:", err.Error())
}
Expand Down

0 comments on commit 63730d5

Please sign in to comment.