Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
simonheys committed Mar 28, 2023
2 parents 336f96c + 1d528c4 commit 64bafc7
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 26 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
"version": "5.3.14",
"version": "5.3.15",
"npmClient": "yarn",
"useWorkspaces": true
}
6 changes: 3 additions & 3 deletions packages/dapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent-x/dapp",
"version": "5.3.14",
"version": "5.3.15",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -10,8 +10,8 @@
"lint": "next lint"
},
"dependencies": {
"@argent/get-starknet": "^5.3.14",
"@argent/x-sessions": "^5.3.14",
"@argent/get-starknet": "^5.3.15",
"@argent/x-sessions": "^5.3.15",
"ethers": "^5.5.1",
"next": "^13.0.0",
"react": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/manifest/v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/chrome-manifest.json",
"name": "Argent X",
"description": "The security of Ethereum with the scale of StarkNet",
"version": "5.3.14",
"version": "5.3.15",
"manifest_version": 2,
"browser_action": {
"default_icon": {
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/manifest/v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/chrome-manifest.json",
"name": "Argent X",
"description": "The security of Ethereum with the scale of StarkNet",
"version": "5.3.14",
"version": "5.3.15",
"manifest_version": 3,
"action": {
"default_icon": {
Expand Down
16 changes: 8 additions & 8 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent-x/extension",
"version": "5.3.14",
"version": "5.3.15",
"main": "index.js",
"license": "MIT",
"devDependencies": {
Expand Down Expand Up @@ -74,13 +74,13 @@
"push-release-branch": "git push --set-upstream origin release/v$npm_package_version --follow-tags"
},
"dependencies": {
"@argent/guardian": "^5.3.14",
"@argent/stack-router": "^5.3.14",
"@argent/ui": "^5.3.14",
"@argent/x-multicall": "^5.3.14",
"@argent/x-sessions": "^5.3.14",
"@argent/x-swap": "^5.3.14",
"@argent/x-window": "^5.3.14",
"@argent/guardian": "^5.3.15",
"@argent/stack-router": "^5.3.15",
"@argent/ui": "^5.3.15",
"@argent/x-multicall": "^5.3.15",
"@argent/x-sessions": "^5.3.15",
"@argent/x-swap": "^5.3.15",
"@argent/x-window": "^5.3.15",
"@chakra-ui/icons": "^2.0.15",
"@chakra-ui/react": "2.5.1",
"@extend-chrome/messages": "^1.2.2",
Expand Down
11 changes: 11 additions & 0 deletions packages/extension/src/ui/services/backgroundAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
WalletAccount,
} from "../../shared/wallet.model"
import { walletStore } from "../../shared/wallet/walletStore"
import { Account } from "../features/accounts/Account"
import { decryptFromBackground, generateEncryptedSecret } from "./crypto"

export const createNewAccount = async (networkId: string) => {
Expand Down Expand Up @@ -48,9 +49,19 @@ export const accountsOnNetwork = (
networkId: string,
) => accounts.filter((account) => account.networkId === networkId)

function isNotBaseWalletAccount(
account?: BaseWalletAccount,
): account is Account {
return Boolean(account && "toBaseWalletAccount" in account)
}

export const selectAccount = async (
account?: BaseWalletAccount,
): Promise<void> => {
/** coerce to sparse BaseWalletAccount to prevent DataCloneError from full Account class instance on FireFox */
if (isNotBaseWalletAccount(account)) {
account = account.toBaseWalletAccount()
}
await walletStore.set("selected", account ?? null)

return connectAccount(account)
Expand Down
2 changes: 1 addition & 1 deletion packages/get-starknet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent/get-starknet",
"version": "5.3.14",
"version": "5.3.15",
"repository": "github:argentlabs/argent-x",
"private": false,
"main": "dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/guardian/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent/guardian",
"version": "5.3.14",
"version": "5.3.15",
"license": "MIT",
"private": false,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/multicall/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent/x-multicall",
"version": "5.3.14",
"version": "5.3.15",
"description": "A library for batched calls to Starknet smart contracts",
"keywords": [
"starknet",
Expand Down
2 changes: 1 addition & 1 deletion packages/sessions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent/x-sessions",
"version": "5.3.14",
"version": "5.3.15",
"description": "Manage sessions for Argent X wallets",
"keywords": [
"starknet",
Expand Down
4 changes: 2 additions & 2 deletions packages/stack-router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent/stack-router",
"version": "5.3.14",
"version": "5.3.15",
"license": "MIT",
"private": true,
"files": [
Expand Down Expand Up @@ -32,7 +32,7 @@
"lodash-es": "^4.17.21"
},
"devDependencies": {
"@argent/ui": "^5.3.14",
"@argent/ui": "^5.3.15",
"@types/lodash-es": "^4.17.6",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@argent-x/storybook",
"version": "5.3.14",
"version": "5.3.15",
"private": true,
"devDependencies": {
"@argent-x/extension": "^5.3.14",
"@argent/ui": "^5.3.14",
"@argent-x/extension": "^5.3.15",
"@argent/ui": "^5.3.15",
"@babel/core": "^7.18.5",
"@chakra-ui/storybook-addon": "^4.0.12",
"@storybook/addon-actions": "^6.5.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/swap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent/x-swap",
"version": "5.3.14",
"version": "5.3.15",
"license": "MIT",
"private": true,
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent/ui",
"version": "5.3.14",
"version": "5.3.15",
"license": "MIT",
"private": true,
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/window/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent/x-window",
"version": "5.3.14",
"version": "5.3.15",
"license": "MIT",
"files": [
"dist"
Expand Down

0 comments on commit 64bafc7

Please sign in to comment.