Skip to content

Commit

Permalink
Merge pull request #259 from near/dev
Browse files Browse the repository at this point in the history
v3.0.1 Release (dev -> main)
  • Loading branch information
lewis-sqa authored Apr 14, 2022
2 parents 33e64ee + 7b004ca commit 2894d3d
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "near-wallet-selector",
"version": "3.0.0",
"version": "3.0.1",
"description": "This is a wallet modal that allows users to interact with NEAR dApps with a selection of available wallets.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@near-wallet-selector/core",
"version": "3.0.0"
"version": "3.0.1"
}
2 changes: 1 addition & 1 deletion packages/ledger/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@near-wallet-selector/ledger",
"version": "3.0.0"
"version": "3.0.1"
}
2 changes: 1 addition & 1 deletion packages/math-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@near-wallet-selector/math-wallet",
"version": "3.0.0"
"version": "3.0.1"
}
2 changes: 1 addition & 1 deletion packages/near-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@near-wallet-selector/near-wallet",
"version": "3.0.0"
"version": "3.0.1"
}
2 changes: 1 addition & 1 deletion packages/sender/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@near-wallet-selector/sender",
"version": "3.0.0"
"version": "3.0.1"
}
6 changes: 5 additions & 1 deletion packages/sender/src/lib/injected-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ interface AccessKey {

export interface RequestSignInResponse {
accessKey: AccessKey;
error: string;
error:
| string
| {
type: string;
};
notificationId: number;
type: "sender-wallet-result";
}
Expand Down
9 changes: 6 additions & 3 deletions packages/sender/src/lib/sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,16 @@ export function setupSender({
await this.init();
}

const { accessKey } = await wallet.requestSignIn({
const { accessKey, error } = await wallet.requestSignIn({
contractId: options.contractId,
methodNames: options.methodNames,
});

if (!accessKey) {
throw new Error("Failed to sign in");
if (!accessKey || error) {
throw new Error(
(typeof error === "string" ? error : error.type) ||
"Failed to sign in"
);
}

updateState((prevState) => ({
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-connect/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@near-wallet-selector/wallet-connect",
"version": "3.0.0"
"version": "3.0.1"
}

0 comments on commit 2894d3d

Please sign in to comment.