-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Solana on mobile via message system feature #15700
Conversation
🚀 Expo preview is ready!
|
14d6795
to
1be1926
Compare
c5453ca
to
3c06bab
Compare
6c2e21c
to
630434f
Compare
59d8d19
to
0c83f3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good 👍
const { applyStyle } = useNativeStyles(); | ||
|
||
if (!firstFeatureMessage) return null; | ||
const killswitch = A.head(useSelector(selectActiveKillswitchMessages)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: What about changing this selector to selectFirstActiveKillswitchMessage
and put the A.head
inside?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even selectActiveKillswitchMessage
(without the First
) sounds good to me for this (only one can be active...)
FeatureFlag.IsRegtestEnabled, | ||
FeatureFlag.IsSolanaEnabled, | ||
FeatureFlag.IsSolanaEnabledByRemote, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it makes sense to mix the feature flag from message system with local feature flags in one slice 🤔 It seems like a duplication of the state to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
49a065c
to
d85fbdf
Compare
const isSolanaSendEnabled = selectIsFeatureFlagEnabled(state, FeatureFlag.IsSolanaSendEnabled); | ||
|
||
if (isSolanaSendEnabled && networkType === 'solana') return true; | ||
if (networkType !== 'cardano' || isCardanoSendEnabled) return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send for all the other networkTypes is already enabled, and we will enable sending solana at the same time as we start supporting it. So there is no need to check anything else but cardano FF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense to simplify that 👍
@@ -44,6 +41,12 @@ export const featureFlagsSlice = createSlice({ | |||
toggleFeatureFlag: (state, { payload }: PayloadAction<{ featureFlag: FeatureFlag }>) => { | |||
state[payload.featureFlag] = !state[payload.featureFlag]; | |||
}, | |||
setFeatureFlag: ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setFeatureFlag is not used anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, it's much simpler now and works correctly, thanks! Just please remove unused setFeatureFlag
🙏
410617d
to
083e638
Compare
Notes for QA @STew790 : There are two stages of testing, 1. can be done right away, but lets sync up on testing 2.
|
QA OK |
Resolve #15613