From 87a24f8d21a6a27514a7f1f182901c11e0fa5fb6 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Mon, 6 Dec 2021 11:47:36 +0800 Subject: [PATCH] Fixed timeout stamp --- src/views/OperationTransfer2Component.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/OperationTransfer2Component.vue b/src/views/OperationTransfer2Component.vue index 748ca8c0..8f5b66f0 100644 --- a/src/views/OperationTransfer2Component.vue +++ b/src/views/OperationTransfer2Component.vue @@ -306,6 +306,7 @@ import { Cosmos } from '@cosmostation/cosmosjs' import vSelect from 'vue-select' import ToastificationContent from '@core/components/toastification/ToastificationContent.vue' import { coin } from '@cosmjs/amino' +import dayjs from 'dayjs' export default { name: 'TransforDialogue', @@ -509,6 +510,7 @@ export default { this.error = 'You have to select a destination' return } + const timeout = dayjs().add(4, 'hour') const txMsgs = [ { typeUrl: '/ibc.applications.transfer.v1.MsgTransfer', @@ -519,7 +521,7 @@ export default { sender: this.address, receiver: this.recipient, // timeoutHeight: undefined, // { revisionHeight: '0', revisionNumber: '0' }, - timeoutTimestamp: String((Math.floor(Date.now() / 1000) + 60) * 1_000_000_000), + timeoutTimestamp: String(timeout.utc().valueOf() * 1000000), }, }, ]