Also apply timeout msg to wallet_send
This commit is contained in:
parent
16da04e6b9
commit
0fb27e7c48
1 changed files with 21 additions and 7 deletions
|
@ -317,13 +317,27 @@ export function doSendDraftTransaction(address, amount) {
|
||||||
type: ACTIONS.SEND_TRANSACTION_FAILED,
|
type: ACTIONS.SEND_TRANSACTION_FAILED,
|
||||||
data: { error: error.message },
|
data: { error: error.message },
|
||||||
});
|
});
|
||||||
dispatch(
|
|
||||||
doToast({
|
const errMsg = typeof error === 'object' ? error.message : error;
|
||||||
message: __('Transaction failed'),
|
if (errMsg.endsWith(ERRORS.SDK_FETCH_TIMEOUT)) {
|
||||||
subMessage: resolveApiMessage(error?.message),
|
dispatch(
|
||||||
isError: true,
|
doOpenModal(MODALS.CONFIRM, {
|
||||||
})
|
title: __('Transaction failed'),
|
||||||
);
|
body:
|
||||||
|
'The transaction timed out, but may have been completed. Please wait a few minutes, then check your wallet transactions before attempting to retry.',
|
||||||
|
onConfirm: (closeModal) => closeModal(),
|
||||||
|
hideCancel: true,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
dispatch(
|
||||||
|
doToast({
|
||||||
|
message: __('Transaction failed'),
|
||||||
|
subMessage: resolveApiMessage(error?.message),
|
||||||
|
isError: true,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Lbry.wallet_send({
|
Lbry.wallet_send({
|
||||||
|
|
Loading…
Reference in a new issue