Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mfornet committed Mar 12, 2021
1 parent 5029b89 commit dd946fa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions testing/adapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ async function getBridgeOnNearBalance ({
nearErc20Account,
{
changeMethods: [],
viewMethods: ['get_balance']
viewMethods: ['ft_balance_of']
}
)

const balance = await nearTokenContract.get_balance({
owner_id: nearReceiverAccount
const balance = await nearTokenContract.ft_balance_of({
account_id: nearReceiverAccount
})
console.log(
`[Rainbow-Bridge on Near] Balance of ${nearReceiverAccount} is ${balance}`
Expand Down
2 changes: 1 addition & 1 deletion testing/ci/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ while ! curl localhost:9545; do
sleep 1
done

node index.js init-near-contracts
node index.js init-near-contracts --num-confirmations 2
node index.js init-eth-ed25519
# Use short lockup time for tests
node index.js init-eth-client --eth-client-lock-eth-amount 1000000000000000000 --eth-client-lock-duration 30
Expand Down
12 changes: 6 additions & 6 deletions testing/transfer-eth-erc20/from-near.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class TransferEthERC20FromNear {
// Withdraw the token on Near side.
try {
const oldBalance = await backoff(10, () =>
nearTokenContract.get_balance({
owner_id: nearSenderAccountId
nearTokenContract.ft_balance_of({
account_id: nearSenderAccountId
})
)
console.log(
Expand All @@ -84,7 +84,7 @@ class TransferEthERC20FromNear {
'withdraw',
{ amount: amount, recipient: ethReceiverAddress },
new BN('300000000000000'),
new BN(0)
new BN(1)
)
console.log(`tx withdraw: ${JSON.stringify(txWithdraw)}`)

Expand Down Expand Up @@ -214,8 +214,8 @@ class TransferEthERC20FromNear {
}
console.log(`Withdrawn ${JSON.stringify(amount)}`)
const newBalance = await backoff(10, () =>
nearTokenContract.get_balance({
owner_id: nearSenderAccountId
nearTokenContract.ft_balance_of({
account_id: nearSenderAccountId
})
)
console.log(
Expand Down Expand Up @@ -382,7 +382,7 @@ class TransferEthERC20FromNear {
nearErc20Account,
{
changeMethods: ['new', 'withdraw'],
viewMethods: ['get_balance']
viewMethods: ['ft_balance_of']
}
)
const nearTokenContractBorsh = new NearMintableToken(
Expand Down
10 changes: 5 additions & 5 deletions testing/transfer-eth-erc20/to-near.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ class TransferETHERC20ToNear {
nearTokenContract,
newOwnerId
}) {
const oldBalance = await nearTokenContract.get_balance({
owner_id: newOwnerId
const oldBalance = await nearTokenContract.ft_balance_of({
account_id: newOwnerId
})
console.log(
`Balance of ${newOwnerId} before the transfer is ${oldBalance}`
Expand All @@ -218,8 +218,8 @@ class TransferETHERC20ToNear {
TransferETHERC20ToNear.showRetryAndExit()
}

const newBalance = await nearTokenContract.get_balance({
owner_id: newOwnerId
const newBalance = await nearTokenContract.ft_balance_of({
account_id: newOwnerId
})
console.log(
`Balance of ${newOwnerId} after the transfer is ${newBalance}`
Expand Down Expand Up @@ -314,7 +314,7 @@ class TransferETHERC20ToNear {
nearErc20Account,
{
changeMethods: [],
viewMethods: ['get_balance']
viewMethods: ['ft_balance_of']
}
)
const nearFactoryContractBorsh = new NearMintableToken(
Expand Down

0 comments on commit dd946fa

Please sign in to comment.