Skip to content

Commit

Permalink
fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
hcote committed Mar 24, 2023
1 parent a28ce38 commit 0f305a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/@magic-sdk/provider/src/modules/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,26 @@ export class WalletModule extends BaseModule {
}

/* Prompt Magic's Wallet UI (not available for users logged in with third party wallets) */
public showUI(): Promise<boolean> {
public showUI() {
const requestPayload = createJsonRpcRequestPayload(MagicPayloadMethod.ShowUI);
return this.request<boolean>(requestPayload);
}

/* Get user info such as the wallet type they are logged in with */
public async getInfo(): Promise<WalletInfo> {
public async getInfo() {
const activeWallet = await getItem(this.localForageKey);
const requestPayload = createJsonRpcRequestPayload(MagicPayloadMethod.GetInfo, [{ walletType: activeWallet }]);
return this.request<WalletInfo>(requestPayload);
}

/* Request email address from logged in user */
public requestUserInfoWithUI(scope?: RequestUserInfoScope): Promise<UserInfo> {
public requestUserInfoWithUI(scope?: RequestUserInfoScope) {
const requestPayload = createJsonRpcRequestPayload(MagicPayloadMethod.RequestUserInfoWithUI, scope ? [scope] : []);
return this.request<UserInfo>(requestPayload);
}

/* Logout user */
public async disconnect(): Promise<boolean> {
public async disconnect() {
clearKeys();
const activeWallet = await getItem(this.localForageKey);
if (activeWallet === Wallets.WalletConnect) {
Expand Down

0 comments on commit 0f305a6

Please sign in to comment.