Fixed timeout stamp

This commit is contained in:
liangping 2021-12-06 11:47:36 +08:00
parent c651b7971c
commit 87a24f8d21

View File

@ -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),
},
},
]