Skip to content

Commit

Permalink
fix(aepp): use complete type of WalletInfo object
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Aug 16, 2023
1 parent 5df22dd commit eeba565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/aepp-wallet-communication/rpc/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface WalletInfo {
id: string;
name: string;
networkId: string;
origin: string;
origin: string; // TODO: origin needs to be provided by transport
type: WALLET_TYPE;
}

Expand Down
9 changes: 3 additions & 6 deletions src/aepp-wallet-communication/wallet-detector.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import BrowserConnection from './connection/Browser';
import BrowserWindowMessageConnection from './connection/BrowserWindowMessage';
import { MESSAGE_DIRECTION, METHODS } from './schema';
import { WalletInfo } from './rpc/types';
import { UnsupportedPlatformError } from '../utils/errors';

interface Wallet {
info: {
id: string;
type: string;
origin: string;
};
info: WalletInfo;
getConnection: () => BrowserWindowMessageConnection;
}
interface Wallets { [key: string]: Wallet }
Expand All @@ -28,7 +25,7 @@ export default (
const wallets: Wallets = {};

connection.connect((
{ method, params }: { method: string; params: Wallet['info'] },
{ method, params }: { method: string; params: WalletInfo },

Check warning on line 28 in src/aepp-wallet-communication/wallet-detector.ts

View check run for this annotation

Codecov / codecov/patch

src/aepp-wallet-communication/wallet-detector.ts#L28

Added line #L28 was not covered by tests
origin: string,
source: Window,
) => {
Expand Down

0 comments on commit eeba565

Please sign in to comment.