refactor(interfaces): add Wallet related properties in User and Crypto interfaces
The change adds Wallet related properties in both User and Crypto interfaces. Specifically, `IUserWallet` interface has been added to `userdata.interface.ts` and 'amount' field has been added to `IUserWalletCryptos` in `crypto.interface.ts`. Also, an extra type `ICryptoInUserWalletInfo` extending `ICryptoInWalletInfo` has been added with `owned_amount` field.
This commit is contained in:
parent
747cc1cdb4
commit
0ead6bd969
@ -1,5 +1,6 @@
|
|||||||
export interface IUserWalletCryptos {
|
export interface IUserWalletCryptos {
|
||||||
Crypto?: ICryptoInWalletInfo;
|
Crypto: ICryptoInWalletInfo;
|
||||||
|
amount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICryptoInWalletInfo {
|
export interface ICryptoInWalletInfo {
|
||||||
@ -12,6 +13,10 @@ export interface ICryptoInWalletInfo {
|
|||||||
updated_at: string;
|
updated_at: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ICryptoInUserWalletInfo extends ICryptoInWalletInfo {
|
||||||
|
owned_amount: number;
|
||||||
|
}
|
||||||
|
|
||||||
export type IAllTrades = ITrade[];
|
export type IAllTrades = ITrade[];
|
||||||
|
|
||||||
export interface ITrade {
|
export interface ITrade {
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
import {
|
||||||
|
ICryptoInUserWalletInfo,
|
||||||
|
type ICryptoInWalletInfo,
|
||||||
|
IUserWalletCryptos,
|
||||||
|
} from "@/interfaces/crypto.interface";
|
||||||
|
|
||||||
export interface IUserData {
|
export interface IUserData {
|
||||||
id: string;
|
id: string;
|
||||||
firstName: string;
|
firstName: string;
|
||||||
@ -11,4 +17,12 @@ export interface IUserData {
|
|||||||
age: number;
|
age: number;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
updated_at: string;
|
updated_at: string;
|
||||||
|
//TODO get on register
|
||||||
|
wallet: IUserWallet;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IUserWallet {
|
||||||
|
uat: number;
|
||||||
|
update_interval: number;
|
||||||
|
owned_cryptos: ICryptoInUserWalletInfo[];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user