-
Notifications
You must be signed in to change notification settings - Fork 14
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
Banxa | UI redesign #1026
base: next
Are you sure you want to change the base?
Banxa | UI redesign #1026
Conversation
nop33
commented
Dec 9, 2024
•
edited
Loading
edited
To be used in the LandingScreen
Introduce new modal system with BuyModal (fix Banxa reload issue)
Tried a LOT to use imprative handle to manage ref and closing bottom modal imperatively. But it was just too complicated and messy. I'll find another way.
Will investigate another way. This works, but we keep some variables in memory after the modal is closed. Not a big deal, but we can do better.
Still not there yet
TS black magic 🧙♂ ️
Fix android
Fix contacts screens
Fix ios font ilias
Fix dashboard icons
Fix iOS font
Add light theme variant in main animation
const openWalletConnectSessionProposalModal = useCallback( | ||
() => | ||
sessionProposalEvent && | ||
dispatch( | ||
openModal({ | ||
name: 'WalletConnectSessionProposalModal', | ||
props: { | ||
approveProposal, | ||
rejectProposal, | ||
proposalEvent: sessionProposalEvent | ||
} | ||
case 'alph_signUnsignedTx': { | ||
const { signerAddress, signerKeyType, unsignedTx } = requestEvent.params.request | ||
.params as SignUnsignedTxParams | ||
}) | ||
), | ||
[approveProposal, dispatch, rejectProposal, sessionProposalEvent] | ||
) | ||
|
||
const fromAddress = addressIds.find((address) => address === signerAddress) | ||
const onSessionProposal = useCallback( | ||
async (sessionProposalEvent: SessionProposalEvent) => { | ||
console.log('📣 RECEIVED EVENT PROPOSAL TO CONNECT TO A DAPP!') | ||
console.log('👉 ARGS:', sessionProposalEvent) | ||
console.log('⏳ WAITING FOR PROPOSAL APPROVAL OR REJECTION') | ||
|
||
if (!fromAddress) { | ||
return respondToWalletConnectWithError(requestEvent, { | ||
message: "Signer address doesn't exist", | ||
code: WALLETCONNECT_ERRORS.SIGNER_ADDRESS_DOESNT_EXIST | ||
}) | ||
} | ||
setSessionProposalEvent(sessionProposalEvent) | ||
openWalletConnectSessionProposalModal() | ||
}, | ||
[openWalletConnectSessionProposalModal] | ||
) |
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.
This doesn't work.
setSessionProposalEvent(sessionProposalEvent)
openWalletConnectSessionProposalModal()
because in the openWalletConnectSessionProposalModal
function, sessionProposalEvent
has not yet received a value before it's called.
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.
Same problem with openWalletConnectSessionRequestModal
.
Related to #947 Closes #856 Also see: #1026 (review)
Related to #947 Also see: #1026 (review)
Related to #947 Closes #856 Also see: #1026 (review)
Related to #947 Also see: #1026 (review)
Related to #947 Closes #856 Also see: #1026 (review)
Related to #947 Also see: #1026 (review)
Related to #947 Closes #856 Also see: #1026 (review)
Related to #947 Also see: #1026 (review)