mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-24 23:35:19 +00:00
fix: use correct recipient for bep3 tests (#613)
This commit is contained in:
parent
9ae99ade27
commit
e9e038a2c4
@ -588,6 +588,7 @@ func (suite *AtomicSwapTestSuite) TestClaimAtomicSwap() {
|
|||||||
// Set sender to other and increment current asset supply for outgoing swap
|
// Set sender to other and increment current asset supply for outgoing swap
|
||||||
if tc.args.direction == types.Outgoing {
|
if tc.args.direction == types.Outgoing {
|
||||||
sender = suite.addrs[6]
|
sender = suite.addrs[6]
|
||||||
|
expectedRecipient = suite.deputy
|
||||||
err := suite.keeper.IncrementCurrentAssetSupply(suite.ctx, expectedClaimAmount[0])
|
err := suite.keeper.IncrementCurrentAssetSupply(suite.ctx, expectedClaimAmount[0])
|
||||||
suite.Nil(err)
|
suite.Nil(err)
|
||||||
}
|
}
|
||||||
@ -739,16 +740,18 @@ func (suite *AtomicSwapTestSuite) TestRefundAtomicSwap() {
|
|||||||
// Create atomic swap
|
// Create atomic swap
|
||||||
expectedRefundAmount := cs(c(BNB_DENOM, 50000))
|
expectedRefundAmount := cs(c(BNB_DENOM, 50000))
|
||||||
sender := suite.deputy
|
sender := suite.deputy
|
||||||
|
expectedRecipient := suite.addrs[9]
|
||||||
|
|
||||||
// Set sender to other and increment current asset supply for outgoing swap
|
// Set sender to other and increment current asset supply for outgoing swap
|
||||||
if tc.args.direction == types.Outgoing {
|
if tc.args.direction == types.Outgoing {
|
||||||
sender = suite.addrs[6]
|
sender = suite.addrs[6]
|
||||||
|
expectedRecipient = suite.deputy
|
||||||
err := suite.keeper.IncrementCurrentAssetSupply(suite.ctx, expectedRefundAmount[0])
|
err := suite.keeper.IncrementCurrentAssetSupply(suite.ctx, expectedRefundAmount[0])
|
||||||
suite.Nil(err)
|
suite.Nil(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err := suite.keeper.CreateAtomicSwap(suite.ctx, suite.randomNumberHashes[i], suite.timestamps[i],
|
err := suite.keeper.CreateAtomicSwap(suite.ctx, suite.randomNumberHashes[i], suite.timestamps[i],
|
||||||
types.DefaultMinBlockLock, sender, suite.addrs[9], TestSenderOtherChain, TestRecipientOtherChain,
|
types.DefaultMinBlockLock, sender, expectedRecipient, TestSenderOtherChain, TestRecipientOtherChain,
|
||||||
expectedRefundAmount, true)
|
expectedRefundAmount, true)
|
||||||
suite.NoError(err)
|
suite.NoError(err)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user