feat(wallet.svelte): integrate pkpWallet into state store
- Initialize pkpWallet with null value inside the component store. - Update store's pkpWallet upon successful wallet connection. - Reflect pkpWallet value reactively in the UI. BREAKING CHANGE: The pkpWallet now resides in the component's store and should be accessed as $store.pkpWallet.
This commit is contained in:
@ -4,11 +4,11 @@
|
||||
let componentsData = {
|
||||
layout: {
|
||||
areas: `
|
||||
"header header header"
|
||||
"main main aside"
|
||||
"footer footer footer";
|
||||
"header main"
|
||||
"aside main"
|
||||
"footer footer";
|
||||
`,
|
||||
columns: '1fr 1fr 1fr',
|
||||
columns: '1fr 1fr',
|
||||
rows: 'auto 1fr auto'
|
||||
},
|
||||
children: [
|
||||
@ -19,15 +19,20 @@
|
||||
services: ['setupLit']
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
id: 'messages',
|
||||
componentName: 'Messages',
|
||||
slot: 'main'
|
||||
slot: 'main',
|
||||
store: {
|
||||
prop1: 'prop1',
|
||||
prop2: 'prop2'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
id: 'wallet',
|
||||
componentName: 'Wallet',
|
||||
slot: 'aside',
|
||||
state: {
|
||||
store: {
|
||||
pkpWallet: '',
|
||||
rpcURL: 'https://rpc.gnosischain.com/',
|
||||
pkpPubKey:
|
||||
'046da3ba67065fd1e2726242ca01cd4601524893f4aa4b0042578fa6cbec28fa8c9a28eb9f7893932fc09717edc9e1db57e157a21eed346247c1db5a722a01f571'
|
||||
|
Reference in New Issue
Block a user