Conversation
|
|
||
| `git clone https://github.com/HathorNetwork/hathor-wallet-service-sync_daemon.git` | ||
| ```sh | ||
| $ git clone https://github.com/HathorNetwork/hathor-wallet-service-sync_daemon.git |
There was a problem hiding this comment.
Can you replace this with
git@github.com:HathorNetwork/hathor-wallet-service.git?
|
|
||
| #### Docker images | ||
|
|
||
| Some packages depends on some docker images. To build them you'll need to have Hathor VPN access configured, check this [link](https://github.com/HathorNetwork/ops-tools/blob/master/terraform/wireguard-vpn/SOP.md#adding-a-new-client-to-the-vpn) for it. |
| @@ -1,5 +1,6 @@ | |||
| { | |||
| "compilerOptions": { | |||
| "composite": true, | |||
| */ | ||
|
|
||
| import { constants } from '@hathor/wallet-lib'; | ||
| import { constants } from "@hathor/wallet-lib"; |
| export enum TokenInfoVersion { | ||
| DEPOSIT = 1, | ||
| FEE = 2 | ||
| } | ||
|
|
||
| export interface ITokenInfo { | ||
| id: string; | ||
| name: string; | ||
| symbol: string; | ||
| version?: TokenInfoVersion | null; | ||
| } | ||
|
|
||
| export interface ITokenInfoOptions extends ITokenInfo { | ||
| transactions?: number | ||
| } | ||
|
|
||
| export class TokenInfo implements ITokenInfo { |
There was a problem hiding this comment.
Do we have those types in the wallet-lib?
There was a problem hiding this comment.
Yes, I'm introducing them in a new PR that should be merged before this.
The types we have there: TokenInfoVersion, ITokenInfo (With a different name)
| ], | ||
| "engines": { | ||
| "node": ">=18" | ||
| "node": ">=20" |
There was a problem hiding this comment.
Maybe we should upgrade to 22, since the current lib version already requires node 22
| name: string; | ||
| symbol: string; | ||
| transactions: number; | ||
| version?: number | null; |
| async up(queryInterface, Sequelize) { | ||
| queryInterface.addColumn("token", "version", { | ||
| type: Sequelize.INTEGER, | ||
| allowNull: true, |
There was a problem hiding this comment.
Why allow null?
We could create the column with a default value of 0 (or whatever value the tokenVersion.DEPOSIT is) so that all "current listed" tokens will be marked as DBTs (Deposit Based Token).
What do you think?
Motivation
This PR is part of the Dynamic transaction model implementation.
According to the docs, tokens can be created with two versions:
The
wallet-serviceis used bywallet-lib, a project that expect theversionfield to be available on thegetTokenDetailsAPI.Acceptance Criteria
TokenInfoentity to handle theversiongetTokenInformationAPI method.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged