Skip to content

Commit

Permalink
Fix a problem where currencyId is not set on Turing chains (#132)
Browse files Browse the repository at this point in the history
* Fix a problem where currencyId is not set on Turing chains

* docs(changeset): Fix a problem where currencyId is not set on Turing chains
  • Loading branch information
chrisli30 authored Dec 17, 2023
1 parent 301c4ee commit 933ed48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-lizards-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@oak-network/config": patch
---

Fix a problem where currencyId is not set on Turing chains
4 changes: 3 additions & 1 deletion packages/config/src/tokens/types/XToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Token, TokenConstructorParams } from "./Token"; // Ensure this path is

interface XTokenConstructorParams {
asset: TokenConstructorParams; // The 'asset' property is introduced here.
id?: number;
isNative: boolean;
contractAddress?: string;
otherSymbol?: string;
Expand All @@ -13,7 +14,7 @@ interface XTokenConstructorParams {
}

class XToken extends Token {
public id: any; // Consider specifying a more precise type if possible.
public id: number | undefined;

public isNative: boolean;

Expand All @@ -29,6 +30,7 @@ class XToken extends Token {
// Spreading 'asset' properties here so that they are passed as individual parameters to the super constructor.
super({ ...params.asset });

this.id = params.id;
this.isNative = params.isNative;
this.contractAddress = params.contractAddress;
this.otherSymbol = params.otherSymbol;
Expand Down

0 comments on commit 933ed48

Please sign in to comment.