Skip to content

feat: add Asset Service and replace asset id with asset code - #2258

Open
MihaiAndrei98 wants to merge 4 commits into
v1from
andrei/int-637
Open

MihaiAndrei98 wants to merge 4 commits into
v1from
andrei/int-637

Conversation

@MihaiAndrei98

Copy link
Copy Markdown
Contributor

Context

  • fixes # INT-637 - replace asset id with asset code

Changes

  • replace asset id with asset code
  • drop asset id from db
  • add new AssetService

@github-actions github-actions Bot added package: wallet/frontend Wallet frontend implementations package: wallet/backend Wallet backend implementations type: test Improvements or additions to tests type: source Source changes labels Oct 9, 2026
Comment thread packages/wallet/backend/src/asset/controller.ts Outdated
Comment thread packages/wallet/backend/tests/rhyza/admin-client.test.ts Outdated
@MihaiAndrei98
MihaiAndrei98 requested a review from Tymmmy October 15, 2026 08:35
export class AssetService implements IAssetService {
constructor(private rhyzaAdminClient: RhyzaAdminClient) {}

async getAssetByCode(assetCode: string, scale?: number): Promise<Asset> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as assets have only one scale, the scale search looks unnecessary

? (asset) => asset.code === assetCode && asset.scale === scale
: (asset) => asset.code === assetCode
)
if (!asset) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

leave a new line before the if block and before return

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: wallet/backend Wallet backend implementations package: wallet/frontend Wallet frontend implementations type: source Source changes type: test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants