Skip to content

Commit 48d458b

Browse files
authored
Show error to end user if the Relay Server throws an error estimating. (#839)
1 parent 74cad3b commit 48d458b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ux/requestsModal/ReviewRelayTransaction/ReviewTransactionContainer.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,12 @@ export const ReviewTransactionContainer = ({
126126
wallet.rifRelaySdk
127127
.estimateTransactionCost(txRequest, feeContract)
128128
.then(setTxCostInRif)
129-
.catch(err => errorHandler(err))
130-
}, [txRequest, wallet.rifRelaySdk, feeContract])
129+
.catch(err => {
130+
console.log('Server Error', err)
131+
request.reject('There is an error connecting to the RIF Relay Server.')
132+
onCancel()
133+
})
134+
}, [txRequest, wallet.rifRelaySdk, feeContract, request, onCancel])
131135

132136
const confirmTransaction = useCallback(async () => {
133137
dispatch(addRecentContact(to))

0 commit comments

Comments
 (0)