Skip to content

Commit

Permalink
Merge pull request #333 from Concordium/transaction-payloads-json
Browse files Browse the repository at this point in the history
Fix the return type of getAccountTransactionHandler
  • Loading branch information
lassemoldrup authored Feb 6, 2024
2 parents 959aafc + 477608b commit b9b0408
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
6 changes: 6 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 7.3.1

### Fixed

- Return type of `getAccountTransactionHandler`.

## 7.3.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@concordium/web-sdk",
"version": "7.3.0",
"version": "7.3.1",
"license": "Apache-2.0",
"engines": {
"node": ">=16"
Expand Down
20 changes: 17 additions & 3 deletions packages/sdk/src/accountTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,17 @@ export class ConfigureDelegationHandler
}
}

export function getAccountTransactionHandler(
type: AccountTransactionType
): AccountTransactionHandler;
export type AccountTransactionPayloadJSON =
| SimpleTransferPayloadJSON
| SimpleTransferWithMemoPayloadJSON
| DeployModulePayloadJSON
| InitContractPayloadJSON
| UpdateContractPayloadJSON
| UpdateCredentialsPayload
| RegisterDataPayloadJSON
| ConfigureDelegationPayloadJSON
| ConfigureBakerPayloadJSON;

export function getAccountTransactionHandler(
type: AccountTransactionType.Transfer
): SimpleTransferHandler;
Expand Down Expand Up @@ -600,6 +608,12 @@ export function getAccountTransactionHandler(
export function getAccountTransactionHandler(
type: AccountTransactionType.ConfigureBaker
): ConfigureBakerHandler;
export function getAccountTransactionHandler(
type: AccountTransactionType
): AccountTransactionHandler<
AccountTransactionPayload,
AccountTransactionPayloadJSON
>;
export function getAccountTransactionHandler(
type: AccountTransactionType
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down

0 comments on commit b9b0408

Please sign in to comment.