@@ -127,85 +127,81 @@ export default function App() {
127127 // },
128128 // null,
129129 // ];
130- // const params = ['Hello World', address];
130+ const params = [ 'Hello World' , address ] ;
131131 // const params = [{ }];
132132 // params.push('Hello World');
133133 // params.push(address);
134134
135- const params = [
136- address ,
137- {
138- types : {
139- EIP712Domain : [
140- {
141- name : 'name' ,
142- type : 'string' ,
143- } ,
144- {
145- name : 'version' ,
146- type : 'string' ,
147- } ,
148- {
149- name : 'chainId' ,
150- type : 'uint256' ,
151- } ,
152- {
153- name : 'verifyingContract' ,
154- type : 'address' ,
155- } ,
156- ] ,
157- Person : [
158- {
159- name : 'name' ,
160- type : 'string' ,
161- } ,
162- {
163- name : 'wallet' ,
164- type : 'address' ,
165- } ,
166- ] ,
167- Mail : [
168- {
169- name : 'from' ,
170- type : 'Person' ,
171- } ,
172- {
173- name : 'to' ,
174- type : 'Person' ,
175- } ,
176- {
177- name : 'contents' ,
178- type : 'string' ,
179- } ,
180- ] ,
181- } ,
182- primaryType : 'Mail' ,
183- domain : {
184- name : 'Ether Mail' ,
185- version : '1' ,
186- chainId : 1 ,
187- verifyingContract : '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC' ,
188- } ,
189- message : {
190- from : {
191- name : 'Cow' ,
192- wallet : address ,
193- } ,
194- to : {
195- name : 'Bob' ,
196- wallet : '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB' ,
197- } ,
198- contents : 'Hello, Bob!' ,
199- } ,
200- } ,
201- ] ;
135+ // const params = [
136+ // address,
137+ // {
138+ // types: {
139+ // EIP712Domain: [
140+ // {
141+ // name: 'name',
142+ // type: 'string',
143+ // },
144+ // {
145+ // name: 'version',
146+ // type: 'string',
147+ // },
148+ // {
149+ // name: 'chainId',
150+ // type: 'uint256',
151+ // },
152+ // {
153+ // name: 'verifyingContract',
154+ // type: 'address',
155+ // },
156+ // ],
157+ // Person: [
158+ // {
159+ // name: 'name',
160+ // type: 'string',
161+ // },
162+ // {
163+ // name: 'wallet',
164+ // type: 'address',
165+ // },
166+ // ],
167+ // Mail: [
168+ // {
169+ // name: 'from',
170+ // type: 'Person',
171+ // },
172+ // {
173+ // name: 'to',
174+ // type: 'Person',
175+ // },
176+ // {
177+ // name: 'contents',
178+ // type: 'string',
179+ // },
180+ // ],
181+ // },
182+ // primaryType: 'Mail',
183+ // domain: {
184+ // name: 'Ether Mail',
185+ // version: '1',
186+ // chainId: chainConfig.chainId ,
187+ // verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
188+ // },
189+ // message: {
190+ // from: {
191+ // name: 'Cow',
192+ // wallet: address,
193+ // },
194+ // to: {
195+ // name: 'Bob',
196+ // wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
197+ // },
198+ // contents: 'Hello, Bob!',
199+ // },
200+ // },
201+ // ];
202202
203203 setConsole ( 'Request Signature' ) ;
204- const res = await web3auth . request (
205- chainConfig ,
206- 'eth_signTypedData_v4' ,
207- params ,
208- ) ;
204+ const res = await web3auth . request ( chainConfig , 'personal_sign' , params ) ;
209205 uiConsole ( res ) ;
210206 } ;
211207
0 commit comments