Skip to content

Commit

Permalink
feat: Expose passport on window (#2202)
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenfowler committed Sep 25, 2024
1 parent 5cca67f commit 2d6704d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,14 @@ export function ImmutableProvider({
);

useEffect(() => {
const passportInstance = new Passport(getPassportConfig(environment));
Object.defineProperty(window, 'passport', {
configurable: true,
value: passportInstance,
});
setSdkClient(new ImmutableX(getSdkConfig(environment)));
setOrderbookClient(new Orderbook(getOrderbookConfig(environment)));
setPassportClient(new Passport(getPassportConfig(environment)));
setPassportClient(passportInstance);
setBlockchainData(new BlockchainData(getBlockchainDataConfig(environment)));
}, [environment]);

Expand Down

0 comments on commit 2d6704d

Please sign in to comment.