Skip to content

Commit f4bbdbb

Browse files
Merge pull request #584 from BitGo/BTC-2291
feat: add fee rate input to recovery forms for utxo
2 parents 901e7af + 4495116 commit f4bbdbb

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

src/containers/BuildUnsignedSweepCoin/BuildUnsignedSweepCoin.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ function Form() {
795795
scan: Number(values.scan),
796796
bitgoKey: values.bitgoKey.replace(/\s+/g, ''),
797797
ignoreAddressTypes: [],
798+
feeRate: values.feeRate ? Number(values.feeRate) : undefined,
798799
});
799800
assert(
800801
isRecoveryTransaction(recoverData),

src/containers/BuildUnsignedSweepCoin/LitecoinForm.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const validationSchema = Yup.object({
1212
scan: Yup.number().required(),
1313
userKey: Yup.string().required(),
1414
userKeyId: Yup.string(),
15+
feeRate: Yup.number().nullable().optional(),
1516
}).required();
1617

1718
export type LitecoinFormProps = {
@@ -35,6 +36,7 @@ export function LitecoinForm({ onSubmit }: LitecoinFormProps) {
3536
scan: 20,
3637
userKey: '',
3738
userKeyId: '',
39+
feeRate: null,
3840
},
3941
validationSchema,
4042
});
@@ -93,6 +95,14 @@ export function LitecoinForm({ onSubmit }: LitecoinFormProps) {
9395
Width="fill"
9496
/>
9597
</div>
98+
<div className="tw-mb-4">
99+
<FormikTextfield
100+
HelperText="(optional) The fee rate in base units per byte to use for the recovery transaction."
101+
Label="Fee Rate"
102+
name="feeRate"
103+
Width="fill"
104+
/>
105+
</div>
96106
<div className="tw-mb-4">
97107
<FormikTextfield
98108
HelperText="The amount of addresses without transactions to scan before stopping the tool."

src/containers/NonBitGoRecoveryCoin/DogecoinForm.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const validationSchema = Yup.object({
1717
backupKey: Yup.string().required(),
1818
bitgoKey: Yup.string().required(),
1919
walletPassphrase: Yup.string().required(),
20+
feeRate: Yup.number().nullable().optional(),
2021
recoveryDestination: Yup.string().required(),
2122
scan: Yup.number().required(),
2223
}).required();
@@ -42,6 +43,7 @@ export function DogecoinForm({ onSubmit }: DogecoinFormProps) {
4243
recoveryDestination: '',
4344
scan: 20,
4445
krsProvider: '',
46+
feeRate: null,
4547
},
4648
validationSchema,
4749
});
@@ -100,6 +102,14 @@ export function DogecoinForm({ onSubmit }: DogecoinFormProps) {
100102
Width="fill"
101103
/>
102104
</div>
105+
<div className="tw-mb-4">
106+
<FormikTextfield
107+
HelperText="(optional) The fee rate in base units per byte to use for the recovery transaction."
108+
Label="Fee Rate"
109+
name="feeRate"
110+
Width="fill"
111+
/>
112+
</div>
103113
<div className="tw-mb-4">
104114
<FormikTextfield
105115
HelperText="The amount of addresses without transactions to scan before stopping the tool."

src/containers/NonBitGoRecoveryCoin/NonBitGoRecoveryCoin.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@ function Form() {
995995
scan: Number(values.scan),
996996
bitgoKey: values.bitgoKey.replace(/\s+/g, ''),
997997
ignoreAddressTypes: [],
998+
feeRate: values.feeRate ? Number(values.feeRate) : undefined,
998999
});
9991000
assert(
10001001
isRecoveryTransaction(recoverData),

0 commit comments

Comments
 (0)