From 5939033a6c8fa2bca55ccffd6c0a9543018d6fba Mon Sep 17 00:00:00 2001 From: William Chong Date: Thu, 8 Feb 2024 03:11:06 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A5=85=20Guard=20tx=20hash=20not=20se?= =?UTF-8?q?t=20in=20arweave=20upload=20flow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/IscnUploadForm.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/IscnUploadForm.vue b/components/IscnUploadForm.vue index 2ac330d6..068f6a89 100644 --- a/components/IscnUploadForm.vue +++ b/components/IscnUploadForm.vue @@ -700,6 +700,9 @@ export default class UploadForm extends Vue { tempRecord.transactionHash = transactionHash if (!tempRecord.transactionHash) { tempRecord.transactionHash = await this.sendArweaveFeeTx(tempRecord); + if (!tempRecord.transactionHash) { + throw new Error('TRANSACTION_NOT_SENT') + } } try { From 4af7807538aec14cad9febdb8d66eae475d40982 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 <75730405+AuroraHuang22@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:18:45 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A9=B9=20Increase=20gas=20multiplier?= =?UTF-8?q?=20for=20updating=20ISCN=20(#437)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🩹 Increase gas multiplier for updating ISCN * 🩹 Set new gas when calling signISCN --- constant/index.ts | 1 + pages/edit/_iscnId.vue | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/constant/index.ts b/constant/index.ts index 380d8e6c..b241a756 100644 --- a/constant/index.ts +++ b/constant/index.ts @@ -18,6 +18,7 @@ export const ISCN_MIN_BALANCE = 0.01; export const ISCN_GAS_FEE = 200000; export const ISCN_GAS_MULTIPLIER = 1.5; +export const UPDATE_ISCN_GAS_MULTIPLIER = 1.75; export const ISCN_REGISTRY_NAME = 'likecoin-chain'; diff --git a/pages/edit/_iscnId.vue b/pages/edit/_iscnId.vue index 1451d891..3988e367 100644 --- a/pages/edit/_iscnId.vue +++ b/pages/edit/_iscnId.vue @@ -238,7 +238,8 @@ import { Vue, Component } from 'vue-property-decorator' import { namespace } from 'vuex-class' import { OfflineSigner } from '@cosmjs/proto-signing' -import { ISCN_PREFIX } from '~/constant' +import { BigNumber } from 'bignumber.js'; +import { ISCN_PREFIX, ISCN_GAS_FEE, UPDATE_ISCN_GAS_MULTIPLIER } from '~/constant' import { logTrackerEvent } from '~/utils/logger' import { signISCN } from '~/utils/cosmos/iscn/sign' import { extractIscnIdPrefix } from '~/utils/ui' @@ -428,6 +429,7 @@ export default class EditIscnPage extends Vue { await this.initIfNecessary() const result = await signISCN(this.payload, this.signer, this.address, { iscnId: this.iscnId, + gas: new BigNumber(ISCN_GAS_FEE).multipliedBy(UPDATE_ISCN_GAS_MULTIPLIER).toFixed(0), }) if (result) { this.$router.replace( From 133671fab8be9d78559649f377864ab224e693ec Mon Sep 17 00:00:00 2001 From: AuroraHuang22 <75730405+AuroraHuang22@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:19:08 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=92=84=20Add=20ISCN=20edit=20bar=20to?= =?UTF-8?q?=20the=20/new=20page=20(#438)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 💄 Add ISCN edit bar to the /new page * 🎨 Remove duplicate props * 🐛 Fix missing data * 💄 Adjust UI of edit bar --- components/IscnEditBar.vue | 97 +++++++++++++++++++++++++++++++++ components/IscnUploadedInfo.vue | 40 ++++++++++---- pages/view/_iscnId/index.vue | 67 ++++++----------------- 3 files changed, 141 insertions(+), 63 deletions(-) create mode 100644 components/IscnEditBar.vue diff --git a/components/IscnEditBar.vue b/components/IscnEditBar.vue new file mode 100644 index 00000000..22386897 --- /dev/null +++ b/components/IscnEditBar.vue @@ -0,0 +1,97 @@ + + + diff --git a/components/IscnUploadedInfo.vue b/components/IscnUploadedInfo.vue index 6d32e1b8..3bfc590c 100644 --- a/components/IscnUploadedInfo.vue +++ b/components/IscnUploadedInfo.vue @@ -6,22 +6,23 @@ -
+
+ diff --git a/pages/view/_iscnId/index.vue b/pages/view/_iscnId/index.vue index dc9ba6b6..71563fe2 100644 --- a/pages/view/_iscnId/index.vue +++ b/pages/view/_iscnId/index.vue @@ -79,60 +79,23 @@ 'max-w-[960px]', 'mx-auto', 'px-[8px]', + 'py-[24px]', 'lg:px-0', ]" > -
-
- -
-
- - -
-
+