Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

wallet-connectors: WalletConnect: Use "lower" camelCase format for transaction type #42

Merged
merged 6 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@
"husky": "^8.0.0",
"lint-staged": "^13.1.0",
"pinst": "^3.0.0"
},
"resolutions": {
"@concordium/web-sdk": "^6.0.0"
}
}
7 changes: 6 additions & 1 deletion packages/wallet-connectors/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Bump dependency `@concordium/web-sdk` to v6.0.0+. This transitively bumps `@concordium/common-sdk` to v9.0.0.

### Fixed

- Schema object format conversion in `signAndSendTransaction` for WalletConnect requests.
- `WalletConnect`: Fix schema object format conversion in `signAndSendTransaction` in request payloads.
- `WalletConnect`: Use standard string identifiers for transaction type in request payload.

## [0.3.1] - 2023-06-04

Expand Down
3 changes: 2 additions & 1 deletion packages/wallet-connectors/src/WalletConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
InitContractPayload,
JsonRpcClient,
UpdateContractPayload,
getTransactionKindString,
serializeInitContractParameters,
serializeTypeValue,
serializeUpdateContractParameters,
Expand Down Expand Up @@ -250,7 +251,7 @@ export class WalletConnectConnection implements WalletConnection {
typedParams?: TypedSmartContractParameters
) {
const params = {
type: AccountTransactionType[type],
type: getTransactionKindString(type),
sender: accountAddress,
payload: accountTransactionPayloadToJson(serializePayloadParameters(type, payload, typedParams)),
schema: convertSchemaFormat(typedParams?.schema),
Expand Down
2 changes: 1 addition & 1 deletion samples/contractupdate/src/useContractSchemaRpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function useContractSchemaRpc(rpc: ConcordiumGRPCClient, contract: Info)
if (!r) {
return err('module source is empty');
}
return ResultAsync.fromPromise(WebAssembly.compile(r), errorString);
return ResultAsync.fromPromise(WebAssembly.compile(r.source), errorString);
bisgardo marked this conversation as resolved.
Show resolved Hide resolved
})
.andThen(findSchema)
.then(setResult);
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1692,11 +1692,11 @@ __metadata:
languageName: node
linkType: hard

"@concordium/common-sdk@npm:6.5.0":
version: 6.5.0
resolution: "@concordium/common-sdk@npm:6.5.0"
"@concordium/common-sdk@npm:9.0.0":
version: 9.0.0
resolution: "@concordium/common-sdk@npm:9.0.0"
dependencies:
"@concordium/rust-bindings": 0.11.1
"@concordium/rust-bindings": 1.1.0
"@grpc/grpc-js": ^1.3.4
"@noble/ed25519": ^1.7.1
"@protobuf-ts/runtime-rpc": ^2.8.2
Expand All @@ -1708,7 +1708,7 @@ __metadata:
iso-3166-1: ^2.1.1
json-bigint: ^1.0.0
uuid: ^8.3.2
checksum: daf7e586b5fd89a4f2e84c602b9ffdbe5215a176b6673aa42abf7c54d722f5380f716672100f6a68c321ba97b87c381476bce768ff1e5299b5d07c6ded96e716
checksum: b640846415dfb18b4bb549519ab7fa7825c6b5e84adf1cfaeeea89bb54341e5176e71f00b732ea9bb375aac938842434ab1d6d5ffe2a5f360efc236ea5b0ef4a
languageName: node
linkType: hard

Expand All @@ -1727,10 +1727,10 @@ __metadata:
languageName: unknown
linkType: soft

"@concordium/rust-bindings@npm:0.11.1":
version: 0.11.1
resolution: "@concordium/rust-bindings@npm:0.11.1"
checksum: fe1bbcd0a98a7e148cfe9fa5ec69a693b19608b64b01723aedd9a7616958d5069cef006f8dfa610f7fad3cd3e8d356c99c76ff2606ea44d90138a43897118277
"@concordium/rust-bindings@npm:1.1.0":
version: 1.1.0
resolution: "@concordium/rust-bindings@npm:1.1.0"
checksum: 4890306b5df5fb85012cc6c6a6daf15ec1d24c528ac487a4547e8758738a1205b2386a1d4b015dc45312811466d853819edff4b9921d3674afe13ade5cacc061
languageName: node
linkType: hard

Expand All @@ -1748,17 +1748,17 @@ __metadata:
languageName: unknown
linkType: soft

"@concordium/web-sdk@npm:^3.4.2":
version: 3.5.0
resolution: "@concordium/web-sdk@npm:3.5.0"
"@concordium/web-sdk@npm:^6.0.0":
version: 6.0.0
resolution: "@concordium/web-sdk@npm:6.0.0"
dependencies:
"@concordium/common-sdk": 6.5.0
"@concordium/rust-bindings": 0.11.1
"@concordium/common-sdk": 9.0.0
"@concordium/rust-bindings": 1.1.0
"@grpc/grpc-js": ^1.3.4
"@protobuf-ts/grpcweb-transport": ^2.8.2
buffer: ^6.0.3
process: ^0.11.10
checksum: 681cfdb2533bba93ac62f44b0fcf5596a0fd89a5895085e3e6a416fa162bc1d22ac3bc1a6f8b89a196c46e89e9fd6401c25c493079f406bf8dfa9c6a7eb0aaa7
checksum: 23cfda2813ed86ed165f427edab237e5c20af70405d450541479294a1093b60843ce9d7f8a2dbeb69e174e0aed0ec51bee109e0fb7e22f121bff5c11c4bb24de
languageName: node
linkType: hard

Expand Down