Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 0 additions & 95 deletions docs/plans/2026-02-11-home-perps-favorites-design.md

This file was deleted.

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 @@
"@noble/secp256k1": "1.7.1",
"@onekeyfe/bitcoinforksjs-lib": "7.0.0-rc.0",
"@onekeyfe/cardano-coin-selection-asmjs": "1.1.10-alpha.8",
"@onekeyfe/coinselect": "3.1.16",
"@onekeyfe/coinselect": "3.1.17",
"@onekeyfe/kaspa-core-lib": "^1.0.2",
"@onekeyfe/kaspa-wasm": "^1.0.2",
"@solana/spl-token": "^0.4.8",
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/utils/coinSelectUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export type ICoinSelectOptions = {
algorithm?: ICoinSelectAlgorithm;
};

export type ICoinSelectSortingStrategy = 'bip69' | 'none' | 'random';

export type ICoinSelectWithWitnessOptions = {
inputsForCoinSelect: IInputsForCoinSelect;
outputsForCoinSelect: IOutputsForCoinSelect;
Expand All @@ -51,6 +53,7 @@ export type ICoinSelectWithWitnessOptions = {
};
txType: ICoinSelectPaymentType;
skipUtxoSelection?: boolean;
sortingStrategy?: ICoinSelectSortingStrategy;
};

function utxoScore(x: ICoinSelectInput, feeRate: number) {
Expand Down Expand Up @@ -187,6 +190,7 @@ export function coinSelectWithWitness(
network,
changeAddress,
txType,
sortingStrategy,
} = params;
const coinselectParams = {
utxos: inputsForCoinSelect.map((u) => ({
Expand All @@ -200,6 +204,7 @@ export function coinSelectWithWitness(
network,
changeAddress,
txType,
sortingStrategy,
};
try {
return coinSelectWitness(coinselectParams);
Expand Down
1 change: 1 addition & 0 deletions packages/kit-bg/src/vaults/impls/btc/Vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ export default class VaultBtc extends VaultBase {
network: btcForkNetwork,
changeAddress,
txType,
sortingStrategy: transfersInfo[0]?.opReturn ? 'none' : undefined,
Comment thread
originalix marked this conversation as resolved.
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
});

if (hasSelectedUtxos) {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8082,9 +8082,9 @@ __metadata:
languageName: node
linkType: hard

"@onekeyfe/coinselect@npm:3.1.16":
version: 3.1.16
resolution: "@onekeyfe/coinselect@npm:3.1.16"
"@onekeyfe/coinselect@npm:3.1.17":
version: 3.1.17
resolution: "@onekeyfe/coinselect@npm:3.1.17"
dependencies:
bchaddrjs: "npm:^0.5.2"
bech32: "npm:^2.0.0"
Expand All @@ -8105,7 +8105,7 @@ __metadata:
wif: "npm:^5.0.0"
peerDependencies:
tslib: ^2.6.2
checksum: 10/7b0706b80f4c93b2e454ab8f8a241ed8f289de986c8839de2019912104a099ec891983fc58845eb1e26a6b9d66e513059684f34b19a705457c892d0fccf570eb
checksum: 10/92aa962a5242780ec7c3f6ab359bac9f44909bb8c871ea65a3bd13dce65366d5f983ea8f9ca55ef202ace788595cd7c61c9dacb18a63772e85a7da608be5c4ef
languageName: node
linkType: hard

Expand Down Expand Up @@ -9235,7 +9235,7 @@ __metadata:
"@noble/secp256k1": "npm:1.7.1"
"@onekeyfe/bitcoinforksjs-lib": "npm:7.0.0-rc.0"
"@onekeyfe/cardano-coin-selection-asmjs": "npm:1.1.10-alpha.8"
"@onekeyfe/coinselect": "npm:3.1.16"
"@onekeyfe/coinselect": "npm:3.1.17"
"@onekeyfe/kaspa-core-lib": "npm:^1.0.2"
"@onekeyfe/kaspa-wasm": "npm:^1.0.2"
"@solana/spl-token": "npm:^0.4.8"
Expand Down