Skip to content

Commit

Permalink
remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
FSM1 committed Oct 24, 2023
1 parent 6e05bbe commit 015810a
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions packages/sdk-manager/src/SdkManagerContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,42 +184,7 @@ export class SdkManagerContextProvider extends LitElement {
this.sdkManager = new SdkManager();
}

async initialize(env?: Environment) {
if (!this.walletManager?.provider) {
throw new Error('No wallet connected');
}

await this.sdkManager?.initialize(this.walletManager.provider, env);
}

async createTransfer(
destinationChainId: number,
destinationAddress: string,
resourceId: string,
amount: string
) {
if (!this.walletManager?.provider) {
throw new Error('No wallet connected');
}

if (!this.sdkManager) {
throw new Error('SdkManager not initialized');
}

if (!(this.sdkManager.status === 'initialized')) {
throw new Error('SdkManager not initialized');
}

await this.sdkManager.createTransfer(
this.walletManager.provider,
destinationChainId,
destinationAddress,
resourceId,
amount
);
}

render() {
return html`<slot></slot>`;
}
}
}

0 comments on commit 015810a

Please sign in to comment.