Skip to content

Commit 518a579

Browse files
authored
Merge pull request #196 from argentlabs/fix/starknetjs-version
fix: starknetjs version for WalletAccount
2 parents d6ce8ef + 28d13f1 commit 518a579

File tree

7 files changed

+55
-86
lines changed

7 files changed

+55
-86
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ on:
44
branches:
55
- develop
66
- main
7-
- beta-braavos-mobile
8-
- beta-ww-sdk
7+
- beta-wallet-account
98
- hotfix\/v[0-9]+.[0-9]+.[0-9]+
109

1110
jobs:

.releaserc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
"prerelease": true
1111
},
1212
{
13-
"name": "beta-braavos-mobile",
14-
"prerelease": true
15-
},
16-
{
17-
"name": "beta-ww-sdk",
13+
"name": "beta-wallet-account",
1814
"prerelease": true
1915
}
2016
],

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"dependencies": {
6868
"@starknet-io/get-starknet": "^4.0.6",
6969
"@starknet-io/get-starknet-core": "^4.0.6",
70-
"@starknet-io/types-js": "^0.7.7",
70+
"@starknet-io/types-js": "^0.7.10",
7171
"@trpc/client": "^10.38.1",
7272
"@trpc/server": "^10.38.1",
7373
"@walletconnect/sign-client": "^2.11.0",
@@ -117,7 +117,7 @@
117117
"zod": "^3.20.6"
118118
},
119119
"peerDependencies": {
120-
"starknet": "^6.11.0"
120+
"starknet": "^6.21.1"
121121
},
122122
"gitHead": "b16688a8638cc138938e74e1a39d004760165d75"
123123
}

pnpm-lock.yaml

Lines changed: 37 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/connectors/argentMobile/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import {
77
type StarknetWindowObject,
88
} from "@starknet-io/types-js"
99
import {
10-
Account,
11-
AccountInterface,
1210
constants,
13-
ProviderInterface,
11+
WalletAccount,
12+
type AccountInterface,
13+
type ProviderInterface,
1414
type ProviderOptions,
1515
} from "starknet"
1616
import {
@@ -136,7 +136,7 @@ export class ArgentMobileBaseConnector extends Connector {
136136
params: { silent_mode: true },
137137
})
138138

139-
return new Account(provider, accounts[0], "")
139+
return new WalletAccount(provider, this._wallet, undefined, accounts[0])
140140
}
141141

142142
async chainId(): Promise<bigint> {

src/connectors/injected/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
type StarknetWindowObject,
77
} from "@starknet-io/types-js"
88
import {
9-
Account,
10-
AccountInterface,
11-
ProviderInterface,
9+
WalletAccount,
10+
type AccountInterface,
11+
type ProviderInterface,
1212
type ProviderOptions,
1313
} from "starknet"
1414
import {
@@ -144,7 +144,7 @@ export class InjectedConnector extends Connector {
144144
params: { silent_mode: true },
145145
})
146146

147-
return new Account(provider, accounts[0], "")
147+
return new WalletAccount(provider, this._wallet, undefined, accounts[0])
148148
}
149149

150150
async connect(_args: ConnectArgs = {}): Promise<ConnectorData> {

src/connectors/webwallet/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import {
22
Permission,
3+
type AccountChangeEventHandler,
34
type RequestFnCall,
45
type RpcMessage,
56
type RpcTypeToMessageMap,
6-
type AccountChangeEventHandler,
77
type StarknetWindowObject,
88
type TypedData,
99
} from "@starknet-io/types-js"
10+
import type { TRPCClientError } from "@trpc/client"
1011
import {
11-
Account,
12+
WalletAccount,
1213
type AccountInterface,
1314
type ProviderInterface,
1415
type ProviderOptions,
@@ -27,15 +28,14 @@ import {
2728
type ConnectorIcons,
2829
} from "../connector"
2930
import { DEFAULT_WEBWALLET_ICON, DEFAULT_WEBWALLET_URL } from "./constants"
31+
import { ConnectAndSignSessionError } from "./errors"
3032
import { openWebwallet } from "./helpers/openWebwallet"
3133
import { setPopupOptions } from "./helpers/trpc"
3234
import {
3335
type Theme,
3436
type WebWalletStarknetWindowObject,
3537
} from "./starknetWindowObject/argentStarknetWindowObject"
3638
import type { ApprovalRequest } from "./starknetWindowObject/types"
37-
import type { TRPCClientError } from "@trpc/client"
38-
import { ConnectAndSignSessionError } from "./errors"
3939

4040
let _wallet: StarknetWindowObject | null = null
4141
let _address: string | null = null
@@ -239,7 +239,7 @@ export class WebWalletConnector extends Connector {
239239
throw new ConnectorNotConnectedError()
240240
}
241241

242-
return new Account(provider, _address, "")
242+
return new WalletAccount(provider, this._wallet, undefined, _address)
243243
}
244244

245245
async chainId(): Promise<bigint> {
@@ -290,5 +290,5 @@ export class WebWalletConnector extends Connector {
290290
}
291291
}
292292

293-
export type { WebWalletStarknetWindowObject, ApprovalRequest }
294293
export { ConnectAndSignSessionError }
294+
export type { ApprovalRequest, WebWalletStarknetWindowObject }

0 commit comments

Comments
 (0)