Skip to content

Commit 0cb22f7

Browse files
committed
Release @argent-x/extension@6.9.1
1 parent 9809241 commit 0cb22f7

File tree

10 files changed

+32
-30
lines changed

10 files changed

+32
-30
lines changed

packages/extension/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @argent-x/extension
22

3+
## 6.9.1
4+
5+
### Patch Changes
6+
7+
- 4f1b2ac88: Release
8+
39
## 6.9.0
410

511
### Minor Changes

packages/extension/manifest/v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://json.schemastore.org/chrome-manifest.json",
33
"name": "Argent X",
44
"description": "The security of Ethereum with the scale of StarkNet",
5-
"version": "5.9.0",
5+
"version": "5.9.1",
66
"manifest_version": 2,
77
"browser_action": {
88
"default_icon": {

packages/extension/manifest/v3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://json.schemastore.org/chrome-manifest.json",
33
"name": "Argent X",
44
"description": "The security of Ethereum with the scale of StarkNet",
5-
"version": "5.9.0",
5+
"version": "5.9.1",
66
"manifest_version": 3,
77
"action": {
88
"default_icon": {

packages/extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@argent-x/extension",
3-
"version": "6.9.0",
3+
"version": "6.9.1",
44
"main": "index.js",
55
"private": true,
66
"license": "MIT",

packages/extension/src/background/transactions/transactionMessaging.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ import {
1616
import { getErrorObject } from "../../shared/utils/error"
1717
import { isAccountDeployed } from "../accountDeploy"
1818
import { HandleMessage, UnhandledMessage } from "../background"
19-
import { isAccountV5 } from "../../shared/utils/accountv4"
19+
import {
20+
isAccountV4__deprecated,
21+
isAccountV5,
22+
} from "../../shared/utils/accountv4"
2023
import { argentMaxFee } from "../utils/argentMaxFee"
2124
import { addEstimatedFees } from "../../shared/transactionSimulation/fees/estimatedFeesRepository"
2225
import { transactionCallsAdapter } from "./transactionAdapter"
@@ -472,12 +475,16 @@ export const handleTransactionMessage: HandleMessage<
472475
throw new AccountError({ code: "NOT_FOUND" })
473476
}
474477
const starknetAccount = await wallet.getSelectedStarknetAccount()
475-
476-
if (!isAccountV5(starknetAccount)) {
478+
if (isAccountV4__deprecated(starknetAccount)) {
477479
// Old accounts are not supported
480+
// This should no longer happen as we prevent deprecated accounts from being used
478481
return respond({
479-
type: "SIMULATE_TRANSACTION_INVOCATION_RES",
480-
data: null,
482+
type: "SIMULATE_TRANSACTIONS_REJ",
483+
data: {
484+
error: new TransactionError({
485+
code: "DEPRECATED_ACCOUNT",
486+
}),
487+
},
481488
})
482489
}
483490

packages/extension/src/background/wallet/account/starknet.service.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,7 @@ export class WalletAccountStarknetService {
102102
return this.getStarknetAccountOfType(starknetAccount, account.type)
103103
}
104104

105-
const providerV4 = getProviderv4__deprecated(
106-
account.network && account.network.sequencerUrl
107-
? account.network
108-
: await this.networkService.getById(selector.networkId),
109-
)
105+
const providerV4 = getProviderv4__deprecated(account.network)
110106

111107
const oldAccount = new AccountV4__deprecated(
112108
providerV4,

packages/extension/src/shared/errors/transaction.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export enum TRANSACTION_ERROR_MESSAGE {
55
INVALID_TRANSACTION_HASH_RANGE = "Transaction Hash needs to be > 0",
66
SIMULATION_DISABLED = "Transaction simulation is disabled",
77
SIMULATION_ERROR = "Transaction simulation failed",
8+
DEPRECATED_ACCOUNT = "Deprecated account",
89
}
910

1011
export type TransactionErrorMessage = keyof typeof TRANSACTION_ERROR_MESSAGE

packages/extension/src/shared/multisig/account.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import { Account as AccountV4__deprecated } from "starknet4-deprecated"
1717
import { MultisigPendingTransaction } from "./pendingTransactionsStore"
1818
import { MultisigSigner } from "./signer"
19-
import { isAccountV4 } from "../utils/accountv4"
19+
import { isAccountV4__deprecated } from "../utils/accountv4"
2020
import { IMultisigBackendService } from "./service/backend/interface"
2121

2222
export class MultisigAccount extends Account {
@@ -42,7 +42,7 @@ export class MultisigAccount extends Account {
4242
account: Account | AccountV4__deprecated,
4343
multisigBackendService: IMultisigBackendService,
4444
): MultisigAccount {
45-
if (isAccountV4(account)) {
45+
if (isAccountV4__deprecated(account)) {
4646
throw Error("Multisig is not supported for old accounts")
4747
}
4848

packages/extension/src/shared/network/provider.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import {
44
SequencerProvider as SequencerProviderV4,
55
RpcProvider as RpcProviderV4,
66
} from "starknet4"
7-
import {
8-
SequencerProvider as SequencerProviderv4__deprecated,
9-
RpcProvider as RpcProviderV4__deprecated,
10-
} from "starknet4-deprecated"
7+
import { SequencerProvider as SequencerProviderv4__deprecated } from "starknet4-deprecated"
118

129
import { Network } from "./type"
1310

@@ -74,19 +71,12 @@ export function getProviderV4ForBaseUrl__deprecated(baseUrl: string) {
7471
return new SequencerProviderv4__deprecated({ baseUrl })
7572
}
7673

77-
export function getProviderV4ForRpcUrl__deprecated(
78-
rpcUrl: string,
79-
): RpcProviderV4__deprecated {
80-
return new RpcProviderV4__deprecated({ nodeUrl: rpcUrl })
81-
}
82-
8374
export function getProviderv4__deprecated(network: Network) {
84-
if (network.rpcUrl) {
85-
return getProviderV4ForRpcUrl__deprecated(network.rpcUrl)
86-
} else if (network.sequencerUrl) {
75+
// Don't use RPC provider here as it's broken for v4
76+
if (network.sequencerUrl) {
8777
return getProviderV4ForBaseUrl__deprecated(network.sequencerUrl)
8878
} else {
89-
throw new Error("No v4 (deprecated) provider available")
79+
throw new Error("RPC is not supported for v4 deprecated provider")
9080
}
9181
}
9282

packages/extension/src/shared/utils/accountv4.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ export function isAccountV5(account: any): account is Account {
66
return "simulateTransaction" in account
77
}
88

9-
export function isAccountV4(account: any): account is AccountV4__deprecated {
9+
export function isAccountV4__deprecated(
10+
account: any,
11+
): account is AccountV4__deprecated {
1012
// simulateTransaction is a property of Account but not AccountV4
1113
return !("simulateTransaction" in account)
1214
}

0 commit comments

Comments
 (0)