From 15360e19cbb8b6bb7d89dd8112aa872cdcc38862 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Thu, 28 Dec 2023 13:13:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Increase=20gas=20fee?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constant/index.ts | 1 + utils/cosmos/iscn/sign.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/constant/index.ts b/constant/index.ts index d678971f..ebcab8b2 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_FEE = 30000; export const ISCN_REGISTRY_NAME = 'likecoin-chain'; diff --git a/utils/cosmos/iscn/sign.ts b/utils/cosmos/iscn/sign.ts index c3422b20..0293b511 100644 --- a/utils/cosmos/iscn/sign.ts +++ b/utils/cosmos/iscn/sign.ts @@ -4,7 +4,7 @@ import { ISCNSignPayload, ISCNSigningClient } from '@likecoin/iscn-js'; import network from '@/constant/network'; import { DeliverTxResponse } from '@cosmjs/stargate'; import { ISCNRegisterPayload } from './iscn.type'; -import { WALLET_TYPE_REPLACER, ISCN_GAS_FEE, DEFAULT_GAS_PRICE } from '~/constant' +import { WALLET_TYPE_REPLACER, ISCN_GAS_FEE, DEFAULT_GAS_PRICE, UPDATE_ISCN_GAS_FEE } from '~/constant' import { getPublisherISCNPayload } from '.'; import { ISCN_PUBLISHERS } from '~/constant/iscn'; @@ -201,6 +201,15 @@ export async function updateISCNRecord( address, iscnId, payload, + { + fee: { + gas: UPDATE_ISCN_GAS_FEE.toString(), + amount: [{ + denom: DEFAULT_GAS_PRICE[0].denom, + amount: DEFAULT_GAS_PRICE[0].amount.toString(), + }], + }, + }, ) const res = await signingPromise