Skip to content

Commit

Permalink
fix: btc fork fee limit (#4247)
Browse files Browse the repository at this point in the history
  • Loading branch information
originalix authored Mar 14, 2024
1 parent c486744 commit 08c1b04
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion packages/engine/src/vaults/impl/bch/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export default class Provider extends BaseProvider {

override getPsbt(): Psbt {
// @ts-expect-error
return new BitcoinForkJS.Psbt({ network: this.network, forkCoin: 'bch' });
return new BitcoinForkJS.Psbt({
network: this.network,
forkCoin: 'bch',
maximumFeeRate: 10000,
});
}
}
2 changes: 1 addition & 1 deletion packages/engine/src/vaults/impl/doge/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class Provider extends BaseProvider {
override getPsbt(): Psbt {
return new BitcoinJS.Psbt({
network: this.network,
maximumFeeRate: 10000,
maximumFeeRate: 1000000,
});
}
}
4 changes: 2 additions & 2 deletions packages/kit/src/views/Send/utils/useBtcCustomFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ export function useBtcCustomFeeForm({
highValue: string;
}) => {
const min = 0;
const max = 2000;
const max = 1000000;
const valueBN = new BigNumber(value);
if (valueBN.isLessThanOrEqualTo(min) || valueBN.isGreaterThan(max)) {
throw new OneKeyValidatorError(
'msg__enter_a_fee_rate_between_str_and_str',
{
min: '0',
max: '2000',
max: '1000000',
},
);
}
Expand Down

0 comments on commit 08c1b04

Please sign in to comment.