mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-15 11:59:21 +01:00
REF: added constant
This commit is contained in:
parent
d60323961b
commit
cdd760f6fa
2 changed files with 3 additions and 6 deletions
|
@ -20,6 +20,7 @@ export class HDSegwitBech32Wallet extends AbstractHDWallet {
|
||||||
static type = 'HDsegwitBech32';
|
static type = 'HDsegwitBech32';
|
||||||
static typeReadable = 'HD SegWit (BIP84 Bech32 Native)';
|
static typeReadable = 'HD SegWit (BIP84 Bech32 Native)';
|
||||||
static defaultRBFSequence = 2147483648; // 1 << 31, minimum for replaceable transactions as per BIP68
|
static defaultRBFSequence = 2147483648; // 1 << 31, minimum for replaceable transactions as per BIP68
|
||||||
|
static finalRBFSequence = 4294967295; // 0xFFFFFFFF
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
@ -727,11 +728,7 @@ export class HDSegwitBech32Wallet extends AbstractHDWallet {
|
||||||
*/
|
*/
|
||||||
createTransaction(utxos, targets, feeRate, changeAddress, sequence, skipSigning = false) {
|
createTransaction(utxos, targets, feeRate, changeAddress, sequence, skipSigning = false) {
|
||||||
if (!changeAddress) throw new Error('No change address provided');
|
if (!changeAddress) throw new Error('No change address provided');
|
||||||
if (sequence === false) {
|
|
||||||
sequence = undefined;
|
|
||||||
} else {
|
|
||||||
sequence = sequence || HDSegwitBech32Wallet.defaultRBFSequence;
|
sequence = sequence || HDSegwitBech32Wallet.defaultRBFSequence;
|
||||||
}
|
|
||||||
|
|
||||||
let algo = coinSelectAccumulative;
|
let algo = coinSelectAccumulative;
|
||||||
if (targets.length === 1 && targets[0] && !targets[0].value) {
|
if (targets.length === 1 && targets[0] && !targets[0].value) {
|
||||||
|
|
|
@ -541,7 +541,7 @@ export default class SendDetails extends Component {
|
||||||
targets,
|
targets,
|
||||||
requestedSatPerByte,
|
requestedSatPerByte,
|
||||||
changeAddress,
|
changeAddress,
|
||||||
this.state.isTransactionReplaceable === true ? HDSegwitBech32Wallet.defaultRBFSequence : false,
|
this.state.isTransactionReplaceable ? HDSegwitBech32Wallet.defaultRBFSequence : HDSegwitBech32Wallet.finalRBFSequence,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (wallet.type === WatchOnlyWallet.type) {
|
if (wallet.type === WatchOnlyWallet.type) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue