-
Notifications
You must be signed in to change notification settings - Fork 50
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
feature(exchange): multi provider. Encryptus and Banxa #3130
Conversation
apps/wallet-mobile/src/features/Exchange/common/ProviderItem/ProviderItem.tsx
Outdated
Show resolved
Hide resolved
apps/wallet-mobile/src/features/Exchange/useCases/SelectProvider/SelectProvider.tsx
Outdated
Show resolved
Hide resolved
…er/SelectProvider.tsx Co-authored-by: Juliano Lazzarotto <30806844+stackchain@users.noreply.github.com> Signed-off-by: banklesss <105349292+banklesss@users.noreply.github.com>
29b6110
to
9cd2a83
Compare
6f89046
to
817e0cb
Compare
817e0cb
to
08d54b2
Compare
key={wallet.id} | ||
manager={exchangeManager} | ||
initialState={{ | ||
providerId: 'banxa', |
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.
banxa as default
orderType === 'buy' | ||
? providerSelected.supportedFeatures.buy?.fee ?? 0 | ||
: providerSelected.supportedFeatures.sell?.fee ?? 0 | ||
const Logo = providerSelected.id === 'banxa' ? BanxaLogo : EncryptusLogo |
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 the best solution. open to ideas
if (orderType === 'buy' && !features.supportedFeatures.buy) orderTypeChanged('sell') | ||
else if (orderType === 'sell' && !features.supportedFeatures.sell) orderTypeChanged('buy') |
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.
maybe this logic should be in the provider
renderItem={({item: [provider, features]}: {item: [string, Exchange.Provider]}) => { | ||
const fee = | ||
orderType === 'buy' ? features.supportedFeatures.buy?.fee ?? 0 : features.supportedFeatures.sell?.fee ?? 0 | ||
const Logo = provider === 'banxa' ? BanxaLogo : EncryptusLogo |
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 the best solution. open to ideas
const Logo = isEncryptus ? EncryptusLogo : BanxaLogo | ||
const label = isEncryptus ? 'Encryptus' : 'Banxa' |
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 the best solution. open to ideas. here we need to take into consideration that banxa cant attach custom params. i will ask them anyway
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.
it is not possible to use Exchange context here because this screen opens in the wallet selection screen (and tx history)
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.
<Stack.Screen name="main-wallet-routes" component={WalletTabNavigator} /> | ||
return ( | ||
<Stack.Navigator | ||
initialRouteName={initialUrl !== null ? 'exchange-result' : 'wallet-selection'} |
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.
here is the route after login
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.
@michaeljscript i think there will be a conflict with your changes. i would say that the result screen is the priority
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.
product question i think
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.
wait you are using a different navigator i think
5f2f345
to
a3f91f4
Compare
TODO:
WARNING: Getting the base URL from encryptus in mainnet will cause an error until they finish deploying the production platform.