Skip to content

Commit

Permalink
Merge pull request #733 from alleslabs/fix/contract-lists
Browse files Browse the repository at this point in the history
fix: contract lists nullable fields
  • Loading branch information
songwongtp committed Jan 18, 2024
2 parents ff4eef4 + 3b71597 commit ff57e6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

- [#733](https://github.com/alleslabs/celatone-frontend/pull/733) Fix contract list nullable fields
- [#732](https://github.com/alleslabs/celatone-frontend/pull/732) Fix custom tab incorrect variant and recent modules text
- [#722](https://github.com/alleslabs/celatone-frontend/pull/722) Fix flicker query page

Expand Down
11 changes: 6 additions & 5 deletions src/lib/services/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,18 @@ const zContractsResponseItem = z
contract_address: zBechAddr32,
label: z.string(),
admin: zBechAddr.nullable(),
instantiator: zBechAddr,
latest_updated: zUtcDate,
instantiator: zBechAddr.nullable(),
latest_updated: zUtcDate.nullable(),
latest_updater: zBechAddr.optional(),
remark: zContractHistoryRemark.optional(),
})
.transform<ContractInfo>((val) => ({
contractAddress: val.contract_address,
label: val.label,
admin: val.admin ? val.admin : undefined,
instantiator: val.instantiator,
latestUpdated: val.latest_updated,
// TODO: change contract info optional fields to nullable fields
admin: val.admin ?? undefined,
instantiator: val.instantiator ?? undefined,
latestUpdated: val.latest_updated ?? undefined,
latestUpdater: val.latest_updater,
remark: val.remark,
}));
Expand Down

2 comments on commit ff57e6f

@vercel
Copy link

@vercel vercel bot commented on ff57e6f Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on ff57e6f Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.