-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: rpc lib integration #500
Conversation
c9a1cbc
to
66e00e8
Compare
ad99944
to
80cf799
Compare
shim.js
Outdated
const { TextEncoder, TextDecoder } = require('text-encoding'); | ||
|
||
global.TextDecoder = TextDecoder; | ||
global.TextEncoder = TextEncoder; | ||
|
||
if (typeof btoa === 'undefined') { | ||
global.btoa = function (str) { | ||
return Buffer.from(str, 'binary').toString('base64'); | ||
}; | ||
} | ||
|
||
if (typeof atob === 'undefined') { | ||
global.atob = function (b64Encoded) { | ||
return Buffer.from(b64Encoded, 'base64').toString('binary'); | ||
}; | ||
} |
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.
These are needed by wallet-connect
@@ -733,8 +736,8 @@ const App = () => ( | |||
> | |||
<NetworkStatusBar /> | |||
<RootStack /> | |||
<WalletConnectModal /> |
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.
So we're able to navigate from inside a modal
b2345e7
to
d79397b
Compare
4947320
to
57ce051
Compare
/> | ||
</ModalBase> | ||
); | ||
}; | ||
|
||
const WarnDisclaimer = ({ onReadMore }) => ( |
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.
Sent to components/WalletConnect/WarnDisclaimer
to be reused in other modals
006fdbc
to
3a16155
Compare
b236a6f
to
3af6727
Compare
const onModalDismiss = useCallback(() => { | ||
dispatch(walletConnectReject()); | ||
onDismiss(); | ||
}, [onDismiss]); |
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.
onDismiss
comes as a prop, so its reference might change, so we need to pass it as a dep
useEffect(() => { | ||
if (isRetrying) { | ||
navigatesToNewNanoContractScreen(); | ||
} | ||
}, [isRetrying, navigation]); |
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.
src/screens/PinScreen.js
Outdated
if (this.props.route.params.dispatchResponse) { | ||
pinScreenResult(pin); | ||
} |
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.
I could have passed a callback in the route params, but I don't think that's ideal as it yields a warning, I created this new param dispatchResponse
as a new mechanism for getting the result in the sagas
We should refactor this in a future PR to stop passing callbacks as params
5208d8f
to
6a33a5f
Compare
9ef9a80
to
a35a521
Compare
src/components/WalletConnect/NanoContract/NewNanoContractTransactionModal.js
Outdated
Show resolved
Hide resolved
72be982
to
56059a2
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.
We discussed the error handling on saga initialization and I'm letting at your discretion to create or not a simple implementation to halt a saga restart, or defer it to another PR.
b23f09c
to
2a6ebf7
Compare
Screen.Recording.2024-07-12.at.10.07.00.mov
Acceptance Criteria
htr_signMessageWithAddress
andhtr_sendNanoContractTx
requestsSecurity Checklist