Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfolch-redeemeum committed Nov 24, 2023
1 parent 1f3fffc commit 3da12eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ function WithSellerData(WrappedComponent: React.ComponentType<Props>) {
</Wrapper>
);
}
if (address && !sellerIdToUse) {
if (!address) {
return <p style={{ textAlign: "center" }}>Please connect your wallet</p>;
}

if (!sellerIdToUse) {
return (
<p style={{ textAlign: "center" }}>
Connect a wallet that has a seller account
Expand All @@ -120,7 +124,7 @@ function WithSellerData(WrappedComponent: React.ComponentType<Props>) {
Please connect this wallet account{" "}
<strong>{ethers.utils.getAddress(forcedAccount)}</strong> (which is
linked to the <strong>assistant</strong> role of the seller id{" "}
<strong>{sellerId}</strong>)
<strong>{sellerId}</strong>). The connected address is {address}
</p>
);
}
Expand Down
5 changes: 2 additions & 3 deletions packages/react-kit/src/lib/signer/externalSigner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ const getDefaultHandleSignerFunction = <R>({
} else if (event.data.result) {
resolve(event.data.result);
}
window.removeEventListener("message", onMessageReceived);
}
}
}
window.addEventListener("message", onMessageReceived, {
once: true
});
window.addEventListener("message", onMessageReceived);
window.parent.postMessage(
{
function: functionName,
Expand Down

0 comments on commit 3da12eb

Please sign in to comment.