diff --git a/packages/snap-examples/examples/bls-signer/index.js b/packages/snap-examples/examples/bls-signer/index.js index 4b925547bf..3b6d5b5976 100644 --- a/packages/snap-examples/examples/bls-signer/index.js +++ b/packages/snap-examples/examples/bls-signer/index.js @@ -8,7 +8,7 @@ console.log('Hello from bls-snap!'); wallet.registerRpcMessageHandler(async (_originString, requestObject) => { switch (requestObject.method) { case 'getAccount': - return getPubKey(); + return await getPubKey(); case 'signMessage': { const pubKey = await getPubKey(); diff --git a/packages/snap-examples/examples/ethers-js/index.js b/packages/snap-examples/examples/ethers-js/index.js index 09c89151a1..13228f0b7e 100644 --- a/packages/snap-examples/examples/ethers-js/index.js +++ b/packages/snap-examples/examples/ethers-js/index.js @@ -12,7 +12,9 @@ const provider = new ethers.providers.Web3Provider(wallet); wallet.registerRpcMessageHandler(async (_originString, requestObject) => { console.log('received request', requestObject); - const privKey = await wallet.getAppKey(); + const privKey = await wallet.request({ + method: 'snap_getAppKey', + }); console.log(`privKey is ${privKey}`); const ethWallet = new ethers.Wallet(privKey, provider); console.dir(ethWallet); diff --git a/packages/snap-examples/examples/hello-snaps/index.js b/packages/snap-examples/examples/hello-snaps/index.js index cc4440dcd5..73e14a19da 100644 --- a/packages/snap-examples/examples/hello-snaps/index.js +++ b/packages/snap-examples/examples/hello-snaps/index.js @@ -2,7 +2,7 @@ wallet.registerRpcMessageHandler(async (originString, requestObject) => { switch (requestObject.method) { case 'hello': return wallet.request({ - method: 'alert', + method: 'snap_confirm', params: [`Hello, ${originString}!`], }); default: