try fix for small authsig bug

This commit is contained in:
Samuel Andert 2023-07-20 13:12:04 +02:00
parent d79342a5f0
commit db5ae4f998

View File

@ -9,7 +9,7 @@
// Load wallet on component mount // Load wallet on component mount
onMount(async () => { onMount(async () => {
const storedAuthSig = localStorage.getItem(LOCAL_STORAGE_KEYS.AUTH_SIGNATURE); const storedAuthSig = await localStorage.getItem(LOCAL_STORAGE_KEYS.AUTH_SIGNATURE);
if (storedAuthSig) { if (storedAuthSig) {
authSig = JSON.parse(storedAuthSig); authSig = JSON.parse(storedAuthSig);
@ -22,13 +22,13 @@
await pkpWallet.init(); await pkpWallet.init();
console.log(pkpWallet); console.log(pkpWallet);
} else { } else {
alert('no authsig'); alert('no authsig parsed from local storage');
} }
}); });
const sendTransaction = async () => { const sendTransaction = async () => {
if (!authSig) { if (!authSig) {
alert('no authsig'); alert('authsig not ready in send transaction');
} else { } else {
console.log('transaction initiated'); console.log('transaction initiated');
const from = pkpWallet.address; const from = pkpWallet.address;