Skip to content

Commit c63d9ea

Browse files
authored
Contract verification status update (#2566)
1 parent 8518ea1 commit c63d9ea

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

.changeset/swift-pillows-teach.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@thirdweb-dev/sdk": patch
3+
"thirdweb": patch
4+
---
5+
6+
Verification status in progress

legacy_packages/sdk/src/evm/common/verification.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ export async function checkVerificationStatus(
261261

262262
const data = await result.json();
263263

264-
if (data?.result !== VerificationStatus.PENDING) {
264+
if (
265+
data?.result !== VerificationStatus.PENDING &&
266+
data?.result !== VerificationStatus.IN_PROGRESS
267+
) {
265268
clearInterval(intervalId);
266269
resolve(data);
267270
}

legacy_packages/sdk/src/evm/types/verification.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const VerificationStatus = {
1818
FAILED: "Fail - Unable to verify",
1919
SUCCESS: "Pass - Verified",
2020
PENDING: "Pending in queue",
21+
IN_PROGRESS: "In progress",
2122
ALREADY_VERIFIED: "Contract source code already verified",
2223
AUTOMATICALLY_VERIFIED: "Already Verified",
2324
};

packages/thirdweb/src/contract/verification/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ const VerificationStatus = {
145145
FAILED: "Fail - Unable to verify",
146146
SUCCESS: "Pass - Verified",
147147
PENDING: "Pending in queue",
148+
IN_PROGRESS: "In progress",
148149
ALREADY_VERIFIED: "Contract source code already verified",
149150
AUTOMATICALLY_VERIFIED: "Already Verified",
150151
};
@@ -185,7 +186,10 @@ export async function checkVerificationStatus(
185186

186187
const data = await result.json();
187188

188-
if (data?.result !== VerificationStatus.PENDING) {
189+
if (
190+
data?.result !== VerificationStatus.PENDING &&
191+
data?.result !== VerificationStatus.IN_PROGRESS
192+
) {
189193
clearInterval(intervalId);
190194
resolve(data);
191195
}

0 commit comments

Comments
 (0)