2022-10-20 17:24:53 +00:00
|
|
|
import { systemClient } from '../services/System';
|
|
|
|
|
|
|
|
export interface Robot {
|
|
|
|
nickname: string | null;
|
|
|
|
token: string | null;
|
|
|
|
pub_key: string | null;
|
|
|
|
enc_priv_key: string | null;
|
|
|
|
bitsEntropy: number | null;
|
|
|
|
shannonEntropy: number | null;
|
|
|
|
stealthInvoices: boolean;
|
|
|
|
activeOrderId: number | null;
|
|
|
|
lastOrderId: number | null;
|
|
|
|
earnedRewards: number;
|
|
|
|
referralCode: string;
|
|
|
|
tgEnabled: boolean;
|
|
|
|
tgBotName: string;
|
|
|
|
tgToken: string;
|
|
|
|
loading: boolean;
|
|
|
|
avatarLoaded: boolean;
|
|
|
|
copiedToken: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const defaultRobot: Robot = {
|
|
|
|
nickname: null,
|
|
|
|
token: systemClient.getCookie('robot_token') ?? null,
|
2022-10-30 19:13:01 +00:00
|
|
|
pub_key: systemClient.getCookie('pub_key').split('\\').join('\n'),
|
|
|
|
enc_priv_key: systemClient.getCookie('enc_priv_key').split('\\').join('\n'),
|
2022-10-20 17:24:53 +00:00
|
|
|
bitsEntropy: null,
|
|
|
|
shannonEntropy: null,
|
|
|
|
stealthInvoices: true,
|
|
|
|
activeOrderId: null,
|
|
|
|
lastOrderId: null,
|
|
|
|
earnedRewards: 0,
|
|
|
|
referralCode: '',
|
|
|
|
tgEnabled: false,
|
|
|
|
tgBotName: 'unknown',
|
|
|
|
tgToken: 'unknown',
|
2022-10-26 09:47:50 +00:00
|
|
|
loading: false,
|
2022-10-20 17:24:53 +00:00
|
|
|
avatarLoaded: false,
|
|
|
|
copiedToken: false,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Robot;
|