Skip to content

Commit 0fe86c3

Browse files
working sign msgs
1 parent aca8d6a commit 0fe86c3

File tree

3 files changed

+71
-75
lines changed

3 files changed

+71
-75
lines changed

demo/rn-bare-example/App.tsx

Lines changed: 69 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -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

demo/rn-bare-example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/types/interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type SdkSpecificInitParams = {
1919
};
2020

2121
export type SdkInitParams = Omit<OpenLoginOptions & SdkSpecificInitParams, "uxMode" | "replaceUrlOnRedirect" | "storageKey"> &
22-
Pick<OpenLoginOptions, "redirectUrl">;
22+
Required<Pick<OpenLoginOptions, "redirectUrl">>;
2323

2424
export type SdkLoginParams = Omit<LoginParams, "getWalletKey">;
2525

0 commit comments

Comments
 (0)