Refactor/fix readme typo (#99)

* fix typos for instance in README

* add web3wallet info to main README

* remove extra space

* update repo link to main

Co-authored-by: Vanessa Mercado <finessevanes@Vanessas-MacBook-Pro.local>
This commit is contained in:
vanes
2023-01-05 10:15:47 -07:00
committed by GitHub
co-authored by Vanessa Mercado
parent 609a3239c6
commit c55f3b5c75
8 changed files with 263 additions and 60 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
NEXT_PUBLIC_PROJECT_ID=...
NEXT_PUBLIC_PROJECT_ID=7f0a189637fc935f70a6c260c11b551f
NEXT_PUBLIC_RELAY_URL=wss://relay.walletconnect.com
+2 -2
View File
@@ -75,7 +75,7 @@ Your `.env.local` now contains the following environment variables:
```javascript
/* old */
signClient.on("session_proposal", async (proposal) => {
const { acknowledged } = await B.approve({
const { acknowledged } = await signClient.approve({
id: proposal.id,
namespaces,
});
@@ -225,7 +225,7 @@ Your `.env.local` now contains the following environment variables:
const iss = `did:pkh:eip155:1:${address}`;
web3wallet.on("auth_request", async (event) => {
// format the payload
const message = authClient.formatMessage(event.params.cacaoPayload, iss);
const message = web3wallet.formatMessage(event.params.cacaoPayload, iss);
// prompt the user to sign the message
const signature = await wallet.signMessage(message);
// respond
@@ -29,6 +29,7 @@ export default function SessionProposalModal() {
// Get proposal data and wallet address from store
const proposal = ModalStore.state.data?.proposal
console.log('ModalStore.state.data', ModalStore.state.data)
// Ensure proposal is defined
if (!proposal) {
@@ -72,11 +73,22 @@ export default function SessionProposalModal() {
}
})
await web3wallet.approveSession({
// await web3wallet.approveSession({
// id,
// relayProtocol: relays[0].protocol,
// namespaces
// })
const session = await web3wallet.approveSession({
id,
relayProtocol: relays[0].protocol,
namespaces
})
console.log('session: ', session)
console.log('id: ', id)
console.log('relayProtocol: ', relays[0].protocol)
console.log('in SessionProposalModal: namespaces', namespaces)
}
ModalStore.close()
}