Skip to content

Commit

Permalink
OK-34380: Resolve LTC tx build failure in extension (#6359)
Browse files Browse the repository at this point in the history
* fix: Add error log

* chore: debug

* fix: upgrade coinselect version

* chore: open console
  • Loading branch information
originalix authored Dec 17, 2024
1 parent 97c6153 commit 2eb0e86
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@onekeyfe/bitcoinforksjs-lib": "7.0.0-rc.0",
"@onekeyfe/cardano-coin-selection": "1.0.0",
"@onekeyfe/cardano-coin-selection-asmjs": "1.1.1",
"@onekeyfe/coinselect": "3.1.13",
"@onekeyfe/coinselect": "3.1.14",
"@onekeyfe/kaspa-core-lib": "^1.0.1",
"@solana/spl-token": "^0.4.8",
"@solana/web3.js": "^1.87.7",
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/utils/coinSelectUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ export function coinSelectWithWitness(
try {
return coinSelectWitness(coinselectParams);
} catch (error) {
defaultLogger.transaction.coinSelect.coinSelectFailed(coinselectParams);
defaultLogger.transaction.coinSelect.coinSelectFailed(
coinselectParams,
error as Error,
);
return {
inputs: undefined,
outputs: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { ICoinSelectParams } from '@onekeyfe/coinselect/witness';

export class CoinSelectScene extends BaseScene {
@LogToLocal()
public coinSelectFailed(params: ICoinSelectParams) {
public coinSelectFailed(params: ICoinSelectParams, error?: Error) {
return {
utxos: params.utxos,
outputs: params.outputs,
Expand All @@ -15,6 +15,12 @@ export class CoinSelectScene extends BaseScene {
txType: params.txType,
baseFee: params.baseFee,
dustThreshold: params.dustThreshold,
error: error
? {
message: error.message,
stack: error.stack,
}
: undefined,
};
}
}
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5975,9 +5975,9 @@ __metadata:
languageName: node
linkType: hard

"@onekeyfe/coinselect@npm:3.1.13":
version: 3.1.13
resolution: "@onekeyfe/coinselect@npm:3.1.13"
"@onekeyfe/coinselect@npm:3.1.14":
version: 3.1.14
resolution: "@onekeyfe/coinselect@npm:3.1.14"
dependencies:
bchaddrjs: "npm:^0.5.2"
bech32: "npm:^2.0.0"
Expand All @@ -5998,7 +5998,7 @@ __metadata:
wif: "npm:^5.0.0"
peerDependencies:
tslib: ^2.6.2
checksum: 10/88d1fc5b9390dcaa20cfc9ad4d633af2de077970a7d735b45852d5dafb17ce0d57479fb16689c0aea0e6d90d8ffe4e75177dd42c0f35cfe1a150a88bf315272d
checksum: 10/97be13c92c9dcffba99deafc78d56ae057c0495571e58582436e24d97424fca828721b7927db5edf58687b19949f1a4330ba8c0abf9a5ec15d03243a2576a517
languageName: node
linkType: hard

Expand Down Expand Up @@ -6836,7 +6836,7 @@ __metadata:
"@onekeyfe/bitcoinforksjs-lib": "npm:7.0.0-rc.0"
"@onekeyfe/cardano-coin-selection": "npm:1.0.0"
"@onekeyfe/cardano-coin-selection-asmjs": "npm:1.1.1"
"@onekeyfe/coinselect": "npm:3.1.13"
"@onekeyfe/coinselect": "npm:3.1.14"
"@onekeyfe/kaspa-core-lib": "npm:^1.0.1"
"@solana/spl-token": "npm:^0.4.8"
"@solana/web3.js": "npm:^1.87.7"
Expand Down

0 comments on commit 2eb0e86

Please sign in to comment.