Skip to content

Commit

Permalink
fix(exchange link): add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
schnogz committed Jun 12, 2020
1 parent 0c6ce84 commit 9a4403b
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -151,7 +151,7 @@ export const getShareWalletAddressesStatus = (state: RootState) =>
state.profile.exchangeOnboarding.shareWalletAddressesWithExchange

// initially a wallet was linked if the user had a `settings` prop in their user data
// sometimes the the link is "successful" but the addresses are not persisted and/or lost
// sometimes the link is "successful" but the addresses are not persisted and/or lost
// now we need to ensure both settings exist and walletAddresses has keys (i.e. addresses)
export const isExchangeAccountLinked = state =>
lift(
Expand All @@ -160,6 +160,8 @@ export const isExchangeAccountLinked = state =>
length(keys(prop('walletAddresses', user))) > 0
)(getUserData(state))

// related to selector above, but will check if addresses are no longer stored and
// suggest to the linking saga that a relink should be attempted
export const isExchangeRelinkRequired = state =>
lift(
user =>
Expand Down

0 comments on commit 9a4403b

Please sign in to comment.