Skip to content

Commit

Permalink
chore: rename networks property to network
Browse files Browse the repository at this point in the history
  • Loading branch information
wainola committed Nov 29, 2023
1 parent 3fdf418 commit 9405bd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/wallet-manager/src/WalletManagerContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ export class WalletManagerContextProvider extends LitElement {
wssConnectionUrl?: string;

@property({ type: String })
networks: Network;
network: Network;

constructor() {
super();
this.networks = Network.EVM;
this.network = Network.EVM;
}

connectedCallback(): void {
this.walletManagerController = new WalletManagerController(
this,
this.networks,
this.network,
{
web3Provider: this.web3Provider,
apiPromise: this.apiPromise,
Expand Down
11 changes: 4 additions & 7 deletions packages/wallet-manager/src/WalletManagerController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class WalletManagerController implements IWalletManagerController {

constructor(
host: ReactiveControllerHost,
networks: Network,
network: Network,
initArgument: {
web3Provider?: Web3Provider;
apiPromise?: ApiPromise;
Expand All @@ -24,14 +24,11 @@ export class WalletManagerController implements IWalletManagerController {
) {
(this.host = host).addController(this);

if (networks === Network.EVM) {
if (network === Network.EVM) {
this.initWeb3Provider(initArgument.web3Provider);
} else if (networks === Network.Substrate) {
} else if (network === Network.Substrate) {
this.initFromApiPromise(initArgument as ApiPromise);
} else if (
networks === Network.Substrate &&
initArgument.wssConnectionUrl
) {
} else if (network === Network.Substrate && initArgument.wssConnectionUrl) {
this.initFromWssProvider(initArgument as string);
}
}
Expand Down

0 comments on commit 9405bd5

Please sign in to comment.