diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d660aa04..d50c4158f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Movement TypeScript SDK will be captured in this file. This changelog is written by hand for now. It adheres to the format set out by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +# Unreleased + +- Raise `DEFAULT_TXN_EXP_SEC_FROM_NOW` from 20 to 120 seconds. A hardware wallet needs a device chooser plus an on-device confirmation, routinely 15 to 60 seconds, and a browser extension adds an approval prompt on top. At 20 seconds the node accepted such a transaction into its mempool and then dropped it once expiry passed, leaving the caller with a hash for a transaction that never confirmed. Callers that want the old window can still pass `options.expireTimestamp`, or set `transactionGenerationConfig.defaultTxnExpirySecFromNow` on `MovementConfig`. + # 5.1.7 (2026-03-25) - Add mainnet Movement Name Service (MNS) router contract address to `NetworkToMnsContract`, enabling `movement.mns` on `Network.MAINNET`. diff --git a/src/utils/const.ts b/src/utils/const.ts index a36ff28f1..8fd757b04 100644 --- a/src/utils/const.ts +++ b/src/utils/const.ts @@ -31,12 +31,18 @@ export const DEFAULT_MAX_GAS_AMOUNT = 200000; * * This time is how long until the blockchain nodes will reject the transaction. * + * Two minutes covers the flows where signing is not instant. A hardware wallet needs a device + * chooser plus an on-device confirmation, which routinely takes 15 to 60 seconds; a browser + * extension adds a user approval prompt on top of that. With a shorter window the node accepts + * the transaction into its mempool and then drops it once expiry passes, so the caller holds a + * hash for a transaction that never confirms. + * * Note that the transaction expiration time varies based on network connection and network load. It may need to be * increased for the transaction to be processed. * @group Implementation * @category Utils */ -export const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20; +export const DEFAULT_TXN_EXP_SEC_FROM_NOW = 120; /** * The default number of seconds to wait for a transaction to be processed.