mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 21:35:21 +01:00
Merge pull request #7438 from BlueWallet/bip47togglr
FIX: Toggle for BIP47 was not visible
This commit is contained in:
commit
23f6905191
@ -655,6 +655,8 @@
|
||||
"bip47": {
|
||||
"payment_code": "Payment Code",
|
||||
"contacts": "Contacts",
|
||||
"bip47_explain": "Reusable and shareable code",
|
||||
"bip47_explain_subtitle": "BIP47",
|
||||
"purpose": "Reusable and shareable code (BIP47)",
|
||||
"pay_this_contact": "Pay this contact",
|
||||
"rename_contact": "Rename contact",
|
||||
|
@ -166,11 +166,12 @@ const ReceiveDetails = () => {
|
||||
}
|
||||
}, [showConfirmedBalance]);
|
||||
|
||||
const isBIP47Enabled = wallet?.isBIP47Enabled();
|
||||
const toolTipActions = useMemo(() => {
|
||||
const action = CommonToolTipActions.PaymentsCode;
|
||||
action.menuState = wallet?.isBIP47Enabled();
|
||||
const action = { ...CommonToolTipActions.PaymentsCode };
|
||||
action.menuState = isBIP47Enabled;
|
||||
return [action];
|
||||
}, [wallet]);
|
||||
}, [isBIP47Enabled]);
|
||||
|
||||
const onPressMenuItem = useCallback(() => {
|
||||
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||
@ -203,10 +204,9 @@ const ReceiveDetails = () => {
|
||||
|
||||
useEffect(() => {
|
||||
wallet?.allowBIP47() &&
|
||||
wallet?.isBIP47Enabled() &&
|
||||
setOptions({
|
||||
headerLeft: () => (wallet?.isBIP47Enabled() ? null : HeaderLeft),
|
||||
headerRight: () => (wallet?.isBIP47Enabled() ? HeaderLeft : HeaderRight),
|
||||
headerLeft: () => HeaderLeft,
|
||||
headerRight: () => HeaderRight,
|
||||
});
|
||||
}, [HeaderLeft, HeaderRight, colors.foregroundColor, setOptions, wallet]);
|
||||
|
||||
|
@ -215,7 +215,8 @@ export const CommonToolTipActions = {
|
||||
},
|
||||
PaymentsCode: {
|
||||
id: keys.PaymentsCode,
|
||||
text: loc.bip47.purpose,
|
||||
text: loc.bip47.bip47_explain,
|
||||
subtitle: loc.bip47.bip47_explain_subtitle,
|
||||
icon: icons.PaymentsCode,
|
||||
menuState: false,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user