Compare commits

...
4 Commits
Author SHA1 Message Date
Chris Troutner c13b029e99 Merge pull request #122 from Permissionless-Software-Foundation/ct-unstable
fix(decodeOpReturn): Replacing error message with better one
2021-02-27 09:47:20 -08:00
Chris Troutner b038e9a7fd fix(decodeOpReturn): Replacing error message with better one 2021-02-27 09:45:24 -08:00
Chris Troutner 7b728fb45d Merge pull request #121 from Permissionless-Software-Foundation/ct-unstable
fix(decodeOpReturn): Adding additional debugging for errors
2021-02-27 09:33:00 -08:00
Chris Troutner d4dbce8df0 fix(decodeOpReturn): Adding additional debugging for errors 2021-02-27 09:31:16 -08:00
+9 -1
View File
@@ -1016,7 +1016,14 @@ class Utils {
return tokenData
} catch (error) {
console.log('decodeOpReturn error: ', error)
if (error.response && error.response.data) throw error.response.data
console.log(`decodeOpReturn error.message: ${error.message}`)
if (error.response && error.response.data) {
// throw error.response.data
error.bchApiMessage = error.message
error.message = error.response.data
}
throw error
}
}
@@ -1239,6 +1246,7 @@ class Utils {
// This is a private function that is called by tokenUtxoDetails().
// It loops through an array of UTXOs and tries to hydrate them with SLP
// token information from the OP_RETURN data.
// If this function hits a rate limit... TODO: describe specific behavior.
async _hydrateUtxo (utxos, usrObj = null) {
try {
const decodeOpReturnCache = {}