Cipher parsing
This commit is contained in:
parent
2593676fae
commit
fbf20ab5d5
@ -189,23 +189,23 @@ export default class Services {
|
||||
}
|
||||
|
||||
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 {
|
||||
const services = await Services.getInstance();
|
||||
try {
|
||||
JSON.parse(message)
|
||||
const router = await Routing.getInstance();
|
||||
router.closeLoginModal()
|
||||
this.injectProcessListPage()
|
||||
} catch {
|
||||
console.log('Not proper format for cipher')
|
||||
}
|
||||
const parsedTx = await services.sdkClient.parse_cipher(message, 0.00001)
|
||||
console.log("🚀 ~ Services ~ parseCipher ~ parsedTx:", parsedTx)
|
||||
await this.handleApiReturn(parsedTx)
|
||||
// await this.saveCipherTxToDb(parsedTx)
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
console.log('parsing new cipher');
|
||||
const apiReturn = await this.sdkClient.parse_cipher(message, 0.00001);
|
||||
console.log("🚀 ~ Services ~ parseCipher ~ apiReturn:", apiReturn);
|
||||
await this.handleApiReturn(apiReturn)
|
||||
} catch (e) {
|
||||
console.log("Cipher isn't for us");
|
||||
}
|
||||
// await this.saveCipherTxToDb(parsedTx)
|
||||
}
|
||||
|
||||
async parseNewTx(tx: string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user