aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/shapeshift.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/controllers/shapeshift.js')
-rw-r--r--app/scripts/controllers/shapeshift.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/scripts/controllers/shapeshift.js b/app/scripts/controllers/shapeshift.js
index 3d955c01f..3bbfaa1c5 100644
--- a/app/scripts/controllers/shapeshift.js
+++ b/app/scripts/controllers/shapeshift.js
@@ -45,18 +45,19 @@ class ShapeshiftController {
})
}
- updateTx (tx) {
- const url = `https://shapeshift.io/txStat/${tx.depositAddress}`
- return fetch(url)
- .then((response) => {
- return response.json()
- }).then((json) => {
+ async updateTx (tx) {
+ try {
+ const url = `https://shapeshift.io/txStat/${tx.depositAddress}`
+ const response = await fetch(url)
+ const json = await response.json()
tx.response = json
if (tx.response.status === 'complete') {
tx.time = new Date().getTime()
}
return tx
- })
+ } catch (err) {
+ log.warn(err)
+ }
}
saveTx (tx) {