From 81c58ab84c131a5713d51a91e8f9557f7d98eaea Mon Sep 17 00:00:00 2001 From: snoopy1412 Date: Sun, 29 Sep 2024 14:54:13 +0800 Subject: [PATCH 1/2] Refactor migration unstake arguments --- src/components/migration/migration.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/migration/migration.tsx b/src/components/migration/migration.tsx index 52eac0f..28fbbd9 100644 --- a/src/components/migration/migration.tsx +++ b/src/components/migration/migration.tsx @@ -39,7 +39,7 @@ export function MigrationModal({ isOpen, maskClosable = true, onClose = () => un address: contract.staking.address, abi: (await import(`@/config/abi/${contract.staking.abiFile}`)).default, functionName: "unstake", - args: [stakedRing, stakedDeposits], + args: [stakedRing || 0n, stakedDeposits || []], }); const receipt = await waitForTransaction({ hash }); From 4bb9ecc3b2c63287cb6c817520a9fcd62f882b3d Mon Sep 17 00:00:00 2001 From: snoopy1412 Date: Sun, 29 Sep 2024 17:49:46 +0800 Subject: [PATCH 2/2] Refactor migration unstake arguments --- src/components/migration/migration.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/migration/migration.tsx b/src/components/migration/migration.tsx index 28fbbd9..0353004 100644 --- a/src/components/migration/migration.tsx +++ b/src/components/migration/migration.tsx @@ -35,11 +35,15 @@ export function MigrationModal({ isOpen, maskClosable = true, onClose = () => un setStep1Busy(true); try { + console.log("functionName unstake"); + console.log("args [ringAmount]", stakedRing); + console.log("args [depositIds]", stakedDeposits); + const { hash } = await writeContract({ address: contract.staking.address, abi: (await import(`@/config/abi/${contract.staking.abiFile}`)).default, functionName: "unstake", - args: [stakedRing || 0n, stakedDeposits || []], + args: [stakedRing, stakedDeposits], }); const receipt = await waitForTransaction({ hash });