-
Notifications
You must be signed in to change notification settings - Fork 2
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
♻️ Extract wallet to context #193
base: dev
Are you sure you want to change the base?
Conversation
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.
First review
@@ -77,13 +81,13 @@ const LoginModal = ({ data, onEnd }: { data: string; onEnd: () => void }) => { | |||
setError((e as Error).message); | |||
setCurrentState(State.ERROR); | |||
} | |||
}, [data, state.p2pClient, state.attemptedInitialLogin]); |
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.
Why state.attemptedInitialLogin
is no more required?
Deploying tzsafe-ui-ghostnet with Cloudflare Pages
|
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.
Cool to have update the package.json and airgap
case "p2pConnect": { | ||
return { ...state, p2pClient: action.payload }; | ||
} | ||
case "addDapp": { | ||
if (!state.address) return state; |
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 address is always defined? I don't know what is addDapp
but can it be triggered when the user is disconnected without any safe?
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.
address is no longer defined in the global state but in wallet context.
addDapp
allows to connect an external dapp with Tzsafe and user have to import a contract to access to this feature, so I believe disconnected user cannot trigger this action
@@ -401,7 +401,7 @@ export function tezosDomains( | |||
action: BUY_ADDRESS.name, | |||
description: ( | |||
<p> | |||
TzSafe doesn't support the entrypoint:{" "} |
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.
You don't need spaces anymore? I am wondering if we can use template string 🤔
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.
Yes you're right :-)
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 updated all of occurrences of this string
@@ -39,7 +39,7 @@ const test_suit = (setTezosToolkit: (tezos: TezosToolkit) => TezosToolkit) => | |||
expect(storage.proposal_counter.isEqualTo(BigNumber(0))).toBe(true); | |||
expect(storage.owners).toEqual([owner]); | |||
storage.metadata.get("").then((value: string) => { | |||
expect(value).toEqual(char2Bytes(ipfs_file)); | |||
expect(value).toEqual(stringToBytes(ipfs_file)); |
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.
what is the difference between char2Bytes
and stringToBytes
? Why do we need to change it?
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.
charToBytes
and bytesToChar
are deprecated => https://taquito.io/typedoc/functions/_taquito_utils.char2Bytes
TODO : Problem with fetching proposals ... To be continued ...