move login modal
This commit is contained in:
parent
546a92c45e
commit
6f21551956
@ -1,5 +1,5 @@
|
|||||||
import modalHtml from '../html/login-modal.html?raw';
|
import modalHtml from '../components/login-modal/login-modal.html?raw';
|
||||||
import modalScript from '../html/login-modal.js?raw';
|
import modalScript from '../components/login-modal/login-modal.js?raw';
|
||||||
import Services from './service';
|
import Services from './service';
|
||||||
import { U32_MAX } from './service';
|
import { U32_MAX } from './service';
|
||||||
import { navigate } from '../router';
|
import { navigate } from '../router';
|
||||||
|
@ -128,12 +128,10 @@ export default class Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async sendNewTxMessage(message: string) {
|
async sendNewTxMessage(message: string) {
|
||||||
// console.log("🚀 ~ WebSocketClient ~ this.ws.onopen= ~ newTxMessage:", message)
|
|
||||||
await sendMessage('NewTx', message);
|
await sendMessage('NewTx', message);
|
||||||
}
|
}
|
||||||
|
|
||||||
async sendCommitMessage(message: string) {
|
async sendCommitMessage(message: string) {
|
||||||
// console.log("🚀 ~ WebSocketClient ~ this.ws.onopen= ~ CommitMessage:", message)
|
|
||||||
await sendMessage('Commit', message);
|
await sendMessage('Commit', message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,18 +143,9 @@ export default class Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async sendFaucetMessage(message: string): Promise<void> {
|
async sendFaucetMessage(message: string): Promise<void> {
|
||||||
// console.log("🚀 ~ WebSocketClient ~ this.ws.onopen= ~ faucetMessage:", message)
|
|
||||||
await sendMessage('Faucet', message);
|
await sendMessage('Faucet', message);
|
||||||
}
|
}
|
||||||
async parseCipher(message: string) {
|
async parseCipher(message: string) {
|
||||||
// try {
|
|
||||||
// JSON.parse(message)
|
|
||||||
// const router = await Routing.getInstance();
|
|
||||||
// router.closeLoginModal()
|
|
||||||
// this.injectProcessListPage()
|
|
||||||
// } catch {
|
|
||||||
// console.log('Not proper format for cipher')
|
|
||||||
// }
|
|
||||||
try {
|
try {
|
||||||
console.log('parsing new cipher');
|
console.log('parsing new cipher');
|
||||||
const apiReturn = await this.sdkClient.parse_cipher(message, 0.00001);
|
const apiReturn = await this.sdkClient.parse_cipher(message, 0.00001);
|
||||||
@ -170,7 +159,6 @@ export default class Services {
|
|||||||
|
|
||||||
async parseNewTx(tx: string) {
|
async parseNewTx(tx: string) {
|
||||||
try {
|
try {
|
||||||
// console.log('==============> sending txxxxxxx parser', tx)
|
|
||||||
const parsedTx = await this.sdkClient.parse_new_tx(tx, 0, 0.0001);
|
const parsedTx = await this.sdkClient.parse_new_tx(tx, 0, 0.0001);
|
||||||
if (parsedTx) {
|
if (parsedTx) {
|
||||||
console.log('🚀 ~ Services ~ parseNewTx ~ parsedTx:', parsedTx);
|
console.log('🚀 ~ Services ~ parseNewTx ~ parsedTx:', parsedTx);
|
||||||
@ -293,21 +281,6 @@ export default class Services {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// async saveTxToDb(tx: CachedMessage) {
|
|
||||||
// const database = await Database.getInstance();
|
|
||||||
// const indexedDb = await database.getDb();
|
|
||||||
// await database.writeObject(indexedDb, 'messages', tx, null);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// async saveCipherTxToDb(tx: string) {
|
|
||||||
// const database = await Database.getInstance();
|
|
||||||
// const indexedDb = await database.getDb();
|
|
||||||
|
|
||||||
// if(tx) {
|
|
||||||
// await database.writeObject(indexedDb, database.getStoreList().AnkCipherMessages, tx, null);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
async getAmount(): Promise<BigInt> {
|
async getAmount(): Promise<BigInt> {
|
||||||
const amount = await this.sdkClient.get_available_amount();
|
const amount = await this.sdkClient.get_available_amount();
|
||||||
return amount;
|
return amount;
|
||||||
@ -319,12 +292,10 @@ export default class Services {
|
|||||||
|
|
||||||
async dumpDevice() {
|
async dumpDevice() {
|
||||||
const device = await this.sdkClient.dump_device();
|
const device = await this.sdkClient.dump_device();
|
||||||
// console.log("🚀 ~ Services ~ dumpDevice ~ device:", device)
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveDevice(device: any): Promise<any> {
|
async saveDevice(device: any): Promise<any> {
|
||||||
// console.log("🚀 ~ Services ~ saveDevice ~ device:", device)
|
|
||||||
const db = await Database.getInstance();
|
const db = await Database.getInstance();
|
||||||
db.addObject({
|
db.addObject({
|
||||||
storeName: 'wallet',
|
storeName: 'wallet',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user