Skip to content

Commit

Permalink
Merge pull request #112 from argentlabs/fix/argent-mobile-invoke-tx
Browse files Browse the repository at this point in the history
fix: argent mobile invoke transaction backward compatible
  • Loading branch information
bluecco authored Jul 4, 2024
2 parents 43f442b + edc0cb1 commit 35bd4a3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
persist-credentials: false

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: install-pnpm
id: pnpm-install
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
persist-credentials: false

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
name: install-pnpm
id: pnpm-install
with:
Expand Down
36 changes: 18 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions src/connectors/argentMobile/modal/starknet/adapter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
AddInvokeTransactionParameters,
RequestFn,
TypedData,
} from "@starknet-io/get-starknet-core"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import { JsonRpcProvider } from "@walletconnect/jsonrpc-provider"
import type SignClient from "@walletconnect/sign-client"
import type { SignerConnection } from "@walletconnect/signer-connection"
Expand All @@ -8,13 +14,6 @@ import type {
SignerInterface,
} from "starknet"
import { RpcProvider, constants } from "starknet"

import {
AddInvokeTransactionParameters,
RequestFn,
TypedData,
} from "@starknet-io/get-starknet-core"
import type { StarknetWindowObject } from "@starknet-io/types-js"
import type { NamespaceAdapterOptions } from "../adapter"
import { NamespaceAdapter } from "../adapter"
import { argentModal } from "../argentModal"
Expand Down Expand Up @@ -55,7 +54,7 @@ export class StarknetAdapter
"starknet_requestAddInvokeTransaction",
"wallet_supportedSpecs",
"wallet_signTypedData",
"wallet_requestAddInvokeTransaction",
"wallet_addInvokeTransaction",
]
public events = ["chainChanged", "accountsChanged"]

Expand Down Expand Up @@ -274,9 +273,11 @@ export class StarknetAdapter
params: {
accountAddress: this.account.address,
executionRequest: {
calls: calls?.map(({ contract_address, ...rest }) => ({
// will be removed when argent mobile will support entry_point and contract_address
calls: calls?.map(({ contract_address, entry_point, ...rest }) => ({
...rest,
contractAddress: contract_address,
entrypoint: entry_point,
})),
},
},
Expand Down

0 comments on commit 35bd4a3

Please sign in to comment.