mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
confirmation check added
This commit is contained in:
parent
4d9ab4a4cd
commit
681605b710
|
|
@ -179,18 +179,8 @@ describe("Socket Connector", function () {
|
||||||
const tx = await dsaWallet0.connect(wallet0).cast(...encodeSpells(spells), wallet0.address);
|
const tx = await dsaWallet0.connect(wallet0).cast(...encodeSpells(spells), wallet0.address);
|
||||||
let receipt = await tx.wait();
|
let receipt = await tx.wait();
|
||||||
const txHash = receipt.transactionHash;
|
const txHash = receipt.transactionHash;
|
||||||
|
console.log("Receipt confimation: ", await receipt.confirmations);
|
||||||
console.log('Bridging Transaction : ', receipt.transactionHash);
|
console.log('Bridging Transaction : ', receipt.transactionHash);
|
||||||
|
|
||||||
const txStatus = setInterval(async () => {
|
|
||||||
const status = await getBridgeStatus(txHash, fromChainId, toChainId);
|
|
||||||
console.log(`SOURCE TX : ${status.result.sourceTxStatus}\nDEST TX : ${status.result.destinationTxStatus}`)
|
|
||||||
|
|
||||||
if (status.result.destinationTxStatus == "COMPLETED") {
|
|
||||||
console.log('DEST TX HASH :', status.result.destinationTransactionHash);
|
|
||||||
clearInterval(txStatus);
|
|
||||||
}
|
|
||||||
}, 80000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should migrate ETH from Eth to Polygon", async function () {
|
it("should migrate ETH from Eth to Polygon", async function () {
|
||||||
|
|
@ -229,18 +219,8 @@ describe("Socket Connector", function () {
|
||||||
const tx = await dsaWallet0.connect(wallet0).cast(...encodeSpells(spells), wallet0.address);
|
const tx = await dsaWallet0.connect(wallet0).cast(...encodeSpells(spells), wallet0.address);
|
||||||
let receipt = await tx.wait();
|
let receipt = await tx.wait();
|
||||||
const txHash = receipt.transactionHash;
|
const txHash = receipt.transactionHash;
|
||||||
|
console.log("Receipt confimation: ", await receipt.confirmations);
|
||||||
console.log('Bridging Transaction : ', receipt.transactionHash);
|
console.log('Bridging Transaction : ', receipt.transactionHash);
|
||||||
|
|
||||||
const txStatus = setInterval(async () => {
|
|
||||||
const status = await getBridgeStatus(txHash, fromChainId, toChainId);
|
|
||||||
console.log(`SOURCE TX : ${status.result.sourceTxStatus}\nDEST TX : ${status.result.destinationTxStatus}`)
|
|
||||||
|
|
||||||
if (status.result.destinationTxStatus == "COMPLETED") {
|
|
||||||
console.log('DEST TX HASH :', status.result.destinationTransactionHash);
|
|
||||||
clearInterval(txStatus);
|
|
||||||
}
|
|
||||||
}, 80000);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user