Skip to content

Commit

Permalink
fix: Align api and client AssociationType model (#1410)
Browse files Browse the repository at this point in the history
* fix: Align api and client AssociationType model

* fix: Update maps that use AssociationType model (client)
  • Loading branch information
msarcev authored Apr 19, 2024
1 parent bdbd186 commit f910833
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const outputTypeToAssociations: Map<AssociatedOutputTab, AssociationType[
"Basic",
[
AssociationType.BASIC_ADDRESS,
AssociationType.BASIC_ADDRESS_EXPIRED,
AssociationType.BASIC_SENDER,
AssociationType.BASIC_EXPIRATION_RETURN,
AssociationType.BASIC_STORAGE_RETURN,
Expand All @@ -27,6 +28,7 @@ export const outputTypeToAssociations: Map<AssociatedOutputTab, AssociationType[
"NFT",
[
AssociationType.NFT_ADDRESS,
AssociationType.NFT_ADDRESS_EXPIRED,
AssociationType.NFT_STORAGE_RETURN,
AssociationType.NFT_EXPIRATION_RETURN,
AssociationType.NFT_ISSUER,
Expand All @@ -38,6 +40,7 @@ export const outputTypeToAssociations: Map<AssociatedOutputTab, AssociationType[

export const ASSOCIATION_TYPE_TO_LABEL = {
[AssociationType.BASIC_ADDRESS]: "Address Unlock Condition",
[AssociationType.BASIC_ADDRESS_EXPIRED]: "Address Unlock Condition (expired)",
[AssociationType.BASIC_SENDER]: "Sender Feature",
[AssociationType.BASIC_EXPIRATION_RETURN]: "Expiration Return Unlock Condtition",
[AssociationType.BASIC_STORAGE_RETURN]: "Storage Deposit Return Unlock Condition",
Expand All @@ -49,6 +52,7 @@ export const ASSOCIATION_TYPE_TO_LABEL = {
[AssociationType.FOUNDRY_ALIAS]: "Immutable Alias Address Unlock Condition",
[AssociationType.NFT_ID]: "Nft Id",
[AssociationType.NFT_ADDRESS]: "Address Unlock Condition",
[AssociationType.NFT_ADDRESS_EXPIRED]: "Address Unlock Condition (expired)",
[AssociationType.NFT_STORAGE_RETURN]: "Storage Deposit Return Unlock Condition",
[AssociationType.NFT_EXPIRATION_RETURN]: "Expiration Return Unlock Condtition",
[AssociationType.NFT_ISSUER]: "Issuer Feature",
Expand Down
2 changes: 2 additions & 0 deletions client/src/models/api/stardust/IAssociationsResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { IResponse } from "../IResponse";

export enum AssociationType {
BASIC_ADDRESS,
BASIC_ADDRESS_EXPIRED,
BASIC_SENDER,
BASIC_EXPIRATION_RETURN,
BASIC_STORAGE_RETURN,
Expand All @@ -12,6 +13,7 @@ export enum AssociationType {
ALIAS_ID,
FOUNDRY_ALIAS,
NFT_ADDRESS,
NFT_ADDRESS_EXPIRED,
NFT_STORAGE_RETURN,
NFT_EXPIRATION_RETURN,
NFT_ISSUER,
Expand Down

0 comments on commit f910833

Please sign in to comment.