mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 01:40:12 +01:00
FIX: Unit switch within Send screen
This commit is contained in:
parent
dd08d54b01
commit
46b708cc2b
@ -38,7 +38,7 @@ interface SelectFeeModalProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const SelectFeeModal = forwardRef<BottomModalHandle, SelectFeeModalProps>(
|
const SelectFeeModal = forwardRef<BottomModalHandle, SelectFeeModalProps>(
|
||||||
({ networkTransactionFees, feePrecalc, feeRate, setCustomFee, setFeePrecalc, feeUnit }, ref) => {
|
({ networkTransactionFees, feePrecalc, feeRate, setCustomFee, setFeePrecalc, feeUnit = BitcoinUnit.BTC }, ref) => {
|
||||||
const [customFee, setCustomFeeState] = useState('');
|
const [customFee, setCustomFeeState] = useState('');
|
||||||
const feeModalRef = useRef<BottomModalHandle>(null);
|
const feeModalRef = useRef<BottomModalHandle>(null);
|
||||||
const customModalRef = useRef<BottomModalHandle>(null);
|
const customModalRef = useRef<BottomModalHandle>(null);
|
||||||
@ -139,7 +139,7 @@ const SelectFeeModal = forwardRef<BottomModalHandle, SelectFeeModalProps>(
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const formatFee = (fee: number) => formatBalance(fee, feeUnit!, true);
|
const formatFee = (fee: number) => formatBalance(fee, feeUnit, true);
|
||||||
|
|
||||||
const handleCustomFeeSubmit = async () => {
|
const handleCustomFeeSubmit = async () => {
|
||||||
if (!/^\d+$/.test(customFee) || Number(customFee) <= 0) {
|
if (!/^\d+$/.test(customFee) || Number(customFee) <= 0) {
|
||||||
|
@ -1371,7 +1371,7 @@ const SendDetails = () => {
|
|||||||
feeRate={feeRate}
|
feeRate={feeRate}
|
||||||
setCustomFee={setCustomFee}
|
setCustomFee={setCustomFee}
|
||||||
setFeePrecalc={setFeePrecalc}
|
setFeePrecalc={setFeePrecalc}
|
||||||
feeUnit={feeUnit || BitcoinUnit.BTC}
|
feeUnit={units[scrollIndex.current]}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<DismissKeyboardInputAccessory />
|
<DismissKeyboardInputAccessory />
|
||||||
|
Loading…
Reference in New Issue
Block a user