From b5ae3d3f68f7bee5944b294f4aefb632f581a304 Mon Sep 17 00:00:00 2001 From: drafish Date: Wed, 19 Jun 2024 16:58:52 +0800 Subject: [PATCH] update @drafish/surge-client --- apps/quick-dapp/package.json | 2 +- apps/quick-dapp/src/actions/index.ts | 8 ++++++-- apps/quick-dapp/yarn.lock | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/quick-dapp/package.json b/apps/quick-dapp/package.json index ed130ad7dc..73cc34a5d8 100644 --- a/apps/quick-dapp/package.json +++ b/apps/quick-dapp/package.json @@ -6,6 +6,6 @@ "dependencies": { "@dnd-kit/core": "^6.1.0", "@dnd-kit/sortable": "^8.0.0", - "@drafish/surge-client": "^1.1.1" + "@drafish/surge-client": "^1.1.4" } } diff --git a/apps/quick-dapp/src/actions/index.ts b/apps/quick-dapp/src/actions/index.ts index 4aebc365fc..35a3bd1e86 100644 --- a/apps/quick-dapp/src/actions/index.ts +++ b/apps/quick-dapp/src/actions/index.ts @@ -202,8 +202,12 @@ export const deploy = async (payload: any, callback: any) => { }, onTick: (tick: string) => {}, }); - } catch (error) { - callback({ code: 'ERROR', error: 'this domain belongs to someone else' }); + } catch ({ message }: any) { + if (message === '403') { + callback({ code: 'ERROR', error: 'this domain belongs to someone else' }); + } else { + callback({ code: 'ERROR', error: 'unknow error, please try again' }); + } return; } diff --git a/apps/quick-dapp/yarn.lock b/apps/quick-dapp/yarn.lock index 295a40a219..986fb9289c 100644 --- a/apps/quick-dapp/yarn.lock +++ b/apps/quick-dapp/yarn.lock @@ -33,10 +33,10 @@ dependencies: tslib "^2.0.0" -"@drafish/surge-client@^1.1.1": - version "1.1.1" - resolved "https://registry.npmjs.org/@drafish/surge-client/-/surge-client-1.1.1.tgz#c457f0988e2c11a6867fa42c0189d8f0fa3d3511" - integrity sha512-xTRCZfeAaoImYAV72YStozKcMjYs9RhKgLqEvXDx6QyHSI9udiSUyBxtYtt1ymwiF8qBxLwdVcjIUTI7pg+qnA== +"@drafish/surge-client@^1.1.4": + version "1.1.4" + resolved "https://registry.npmjs.org/@drafish/surge-client/-/surge-client-1.1.4.tgz#786c257ca8e0d6907a02d8e4f885b9358d328d22" + integrity sha512-2OfX2fqcykay0BYnodLYEhLKGfehuTRVEuwLbkwOD8ZSpeH2hSvCBGRZgaEvCpznGfU0QNwVZbq2dJVKLxi2Mg== dependencies: buffer "^6.0.3" pako "^2.1.0"