Skip to content

Commit

Permalink
[meteor-wallet] Updated SDK to support verifyOwner method
Browse files Browse the repository at this point in the history
  • Loading branch information
lostpebble committed Sep 2, 2022
1 parent f4a4bb5 commit 3f8b71c
Show file tree
Hide file tree
Showing 3 changed files with 17,711 additions and 13,029 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@jscutlery/semver": "^2.25.2",
"@ledgerhq/hw-transport": "6.27.1",
"@ledgerhq/hw-transport-webhid": "6.27.1",
"@meteorwallet/sdk": "0.3.0",
"@meteorwallet/sdk": "0.4.0",
"@nightlylabs/connect-near": "0.0.10",
"@walletconnect/qrcode-modal": "2.0.0-alpha.20",
"@walletconnect/sign-client": "^2.0.0-beta.102",
Expand Down
12 changes: 10 additions & 2 deletions packages/meteor-wallet/src/lib/meteor-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const setupWalletState = async (
const createMeteorWalletInjected: WalletBehaviourFactory<
InjectedWallet,
{ params: MeteorWalletParams_Injected }
> = async ({ metadata, options, logger, store, params }) => {
> = async ({ options, logger, store, params }) => {
const _state = await setupWalletState(params, options.network);

const cleanup = () => {
Expand Down Expand Up @@ -159,7 +159,15 @@ const createMeteorWalletInjected: WalletBehaviourFactory<
async verifyOwner({ message }) {
logger.log("MeteorWallet:verifyOwner", { message });

throw new Error(`Method not supported by ${metadata.name}`);
const response = await _state.wallet.verifyOwner({
message,
});

if (response.success) {
return response.payload;
} else {
throw new Error(`Couldn't verify owner: ${response.message}`);
}
},

async signAndSendTransaction({ signerId, receiverId, actions }) {
Expand Down
Loading

0 comments on commit 3f8b71c

Please sign in to comment.