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 {
|
||||
Crypto?: ICryptoInWalletInfo;
|
||||
Crypto: ICryptoInWalletInfo;
|
||||
amount: number;
|
||||
}
|
||||
|
||||
export interface ICryptoInWalletInfo {
|
||||
@ -12,6 +13,10 @@ export interface ICryptoInWalletInfo {
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface ICryptoInUserWalletInfo extends ICryptoInWalletInfo {
|
||||
owned_amount: number;
|
||||
}
|
||||
|
||||
export type IAllTrades = ITrade[];
|
||||
|
||||
export interface ITrade {
|
||||
|
@ -1,3 +1,9 @@
|
||||
import {
|
||||
ICryptoInUserWalletInfo,
|
||||
type ICryptoInWalletInfo,
|
||||
IUserWalletCryptos,
|
||||
} from "@/interfaces/crypto.interface";
|
||||
|
||||
export interface IUserData {
|
||||
id: string;
|
||||
firstName: string;
|
||||
@ -11,4 +17,12 @@ export interface IUserData {
|
||||
age: number;
|
||||
created_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