Skip to content

Commit 124185b

Browse files
fix: revert deposit telemetry backend flow
1 parent c78cd97 commit 124185b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/pages/tBTC/Bridge/Minting/ProvideData.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,16 @@ export const ProvideDataComponent: FC<{
267267
networkName
268268
)
269269

270-
await depositTelemetry(receipt, btcDepositAddress)
270+
try {
271+
await depositTelemetry(receipt, btcDepositAddress)
272+
} catch (error) {
273+
threshold.tbtc.removeDepositData()
274+
resetDepositData()
275+
removeDepositDataFromLocalStorage(networkName)
276+
setSubmitButtonLoading(false)
277+
setTelemetryFailed(true)
278+
return
279+
}
271280

272281
// if the user has NOT declined the json file, ask the user if they want to accept the new file
273282
if (shouldDownloadDepositReceipt) {

0 commit comments

Comments
 (0)