Skip to content

Commit

Permalink
fix: update window.rei.ckb
Browse files Browse the repository at this point in the history
  • Loading branch information
wendychaung committed Feb 3, 2025
1 parent 45c9292 commit 94ac508
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/rei/src/signersFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import { ReiSigner } from "./signer.js";

/**
* Retrieves the Rei signer if available.
* @param client - The client instance.
* @returns The Signer instance if the Rei provider is available, otherwise undefined.
* @param {ccc.Client} client - The client instance.
* @returns {Signer | undefined} The Signer instance if the Rei provider is available, otherwise undefined.
*/
export function getReiSigners(client: ccc.Client): ccc.SignerInfo[] {
const windowRef = window as { ckb?: Provider };
const windowRef = window as { rei?:{ckb: Provider} };

if (typeof windowRef.ckb === "undefined") {
if (typeof windowRef?.rei?.ckb === "undefined") {
return [];
}

return [
{
signer: new ReiSigner(client, windowRef.ckb),
signer: new ReiSigner(client, windowRef.rei.ckb),
name: "CKB",
},
];
Expand Down

0 comments on commit 94ac508

Please sign in to comment.