@exodus/bitcoin-api 2.5.4 → 2.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "description": "Exodus bitcoin-api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -43,5 +43,5 @@
43
43
  "@scure/btc-signer": "^1.1.0",
44
44
  "jest-when": "^3.5.1"
45
45
  },
46
- "gitHead": "a75b2bb02cea9bab6146a9a704ef2a191b2d3b49"
46
+ "gitHead": "34e27320059c9cb94b150c3206309bfa5ae54671"
47
47
  }
@@ -482,11 +482,19 @@ export const createAndBroadcastTXFactory = ({
482
482
  ? replaceTx.data.sent.concat([{ address: displayReceiveAddress, amount }])
483
483
  : [{ address: displayReceiveAddress, amount }]
484
484
 
485
- const coinAmount = selfSend
486
- ? maybeToken.currency.ZERO
487
- : isToken
488
- ? tokenAmount.abs().negate()
489
- : totalAmount.abs().negate()
485
+ const calculateCoinAmount = () => {
486
+ if (selfSend) {
487
+ return maybeToken.currency.ZERO
488
+ } else if (isToken) {
489
+ return tokenAmount.abs().negate()
490
+ } else if (nft) {
491
+ return transferOrdinalsUtxos.value.abs().negate()
492
+ } else {
493
+ return totalAmount.abs().negate()
494
+ }
495
+ }
496
+
497
+ const coinAmount = calculateCoinAmount()
490
498
 
491
499
  await assetClientInterface.updateTxLogAndNotify({
492
500
  assetName: maybeToken.name,