fix(react-dapp): ensures pending state is set before RPC modal opens
This commit is contained in:
parent
04ecb7a155
commit
940d59fc00
@ -388,6 +388,7 @@ export default function App() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
setPending(true);
|
||||||
// get ethereum address
|
// get ethereum address
|
||||||
const account = accounts.find(account => account.startsWith(chainId));
|
const account = accounts.find(account => account.startsWith(chainId));
|
||||||
if (account === undefined) throw new Error("Account is not found");
|
if (account === undefined) throw new Error("Account is not found");
|
||||||
@ -447,6 +448,7 @@ export default function App() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
setPending(true);
|
||||||
// test message
|
// test message
|
||||||
const message = `My email is john@doe.com - ${Date.now()}`;
|
const message = `My email is john@doe.com - ${Date.now()}`;
|
||||||
|
|
||||||
@ -516,6 +518,8 @@ export default function App() {
|
|||||||
throw new Error("Session is not connected");
|
throw new Error("Session is not connected");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
setPending(true);
|
||||||
|
|
||||||
// test message
|
// test message
|
||||||
const message = JSON.stringify(eip712.example);
|
const message = JSON.stringify(eip712.example);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user