Persist BTC swap address across devices

## Issue
Used by [Support for swapping into LBC](https://github.com/lbryio/lbry-desktop/pull/5654)
This commit is contained in:
infiinte-persistence 2021-03-14 14:43:50 +08:00 committed by Sean Yesmunt
parent 9a17013728
commit 9f7902aa0b
2 changed files with 9 additions and 1 deletions

5
dist/bundle.es.js vendored
View file

@ -1752,12 +1752,13 @@ function extractUserState(rawObj) {
following,
tags,
blocked,
btc_addresses,
settings,
app_welcome_version,
sharing_3P
} = rawObj.value;
return _extends$1({}, subscriptions ? { subscriptions } : {}, following ? { following } : {}, tags ? { tags } : {}, blocked ? { blocked } : {}, settings ? { settings } : {}, app_welcome_version ? { app_welcome_version } : {}, sharing_3P ? { sharing_3P } : {});
return _extends$1({}, subscriptions ? { subscriptions } : {}, following ? { following } : {}, tags ? { tags } : {}, blocked ? { blocked } : {}, btc_addresses ? { btc_addresses } : {}, settings ? { settings } : {}, app_welcome_version ? { app_welcome_version } : {}, sharing_3P ? { sharing_3P } : {});
}
return {};
@ -1770,6 +1771,7 @@ function doPopulateSharedUserState(sharedSettings) {
following,
tags,
blocked,
btc_addresses,
settings,
app_welcome_version,
sharing_3P
@ -1781,6 +1783,7 @@ function doPopulateSharedUserState(sharedSettings) {
following,
tags,
blocked,
btcAddresses: btc_addresses,
settings,
welcomeVersion: app_welcome_version,
allowAnalytics: sharing_3P

View file

@ -9,6 +9,7 @@ type SharedData = {
following?: Array<{ uri: string, notificationsDisabled: boolean }>,
tags?: Array<string>,
blocked?: Array<string>,
btc_addresses?: Array<string>,
settings?: any,
app_welcome_version?: number,
sharing_3P?: boolean,
@ -22,6 +23,7 @@ function extractUserState(rawObj: SharedData) {
following,
tags,
blocked,
btc_addresses,
settings,
app_welcome_version,
sharing_3P,
@ -32,6 +34,7 @@ function extractUserState(rawObj: SharedData) {
...(following ? { following } : {}),
...(tags ? { tags } : {}),
...(blocked ? { blocked } : {}),
...(btc_addresses ? { btc_addresses } : {}),
...(settings ? { settings } : {}),
...(app_welcome_version ? { app_welcome_version } : {}),
...(sharing_3P ? { sharing_3P } : {}),
@ -48,6 +51,7 @@ export function doPopulateSharedUserState(sharedSettings: any) {
following,
tags,
blocked,
btc_addresses,
settings,
app_welcome_version,
sharing_3P,
@ -59,6 +63,7 @@ export function doPopulateSharedUserState(sharedSettings: any) {
following,
tags,
blocked,
btcAddresses: btc_addresses,
settings,
welcomeVersion: app_welcome_version,
allowAnalytics: sharing_3P,