diff --git a/plugins/plugins/core/components/qdn-action-types.js b/plugins/plugins/core/components/qdn-action-types.js index 6a823431..c574e1a5 100644 --- a/plugins/plugins/core/components/qdn-action-types.js +++ b/plugins/plugins/core/components/qdn-action-types.js @@ -43,6 +43,12 @@ export let GET_SERVER_CONNECTION_HISTORY = "GET_SERVER_CONNECTION_HISTORY"; // SET_CURRENT_FOREIGN_SERVER export let SET_CURRENT_FOREIGN_SERVER = "SET_CURRENT_FOREIGN_SERVER"; +// ADD_FOREIGN_SERVER +export let ADD_FOREIGN_SERVER = "ADD_FOREIGN_SERVER"; + +// REMOVE_FOREIGN_SERVER +export let REMOVE_FOREIGN_SERVER = "REMOVE_FOREIGN_SERVER"; + // GET_WALLET_BALANCE action export const GET_WALLET_BALANCE = 'GET_WALLET_BALANCE' @@ -103,11 +109,5 @@ export const GET_DAY_SUMMARY = 'GET_DAY_SUMMARY' // GET_FRIENDS_LIST export const GET_FRIENDS_LIST = 'GET_FRIENDS_LIST' -// GET_FOREIGN_FEE -export const GET_FOREIGN_FEE = 'GET_FOREIGN_FEE' - -// UPDATE_FOREIGN_FEE -export const UPDATE_FOREIGN_FEE = 'UPDATE_FOREIGN_FEE' - // OPEN_PROFILE -export const OPEN_PROFILE = 'OPEN_PROFILE' \ No newline at end of file +export const OPEN_PROFILE = 'OPEN_PROFILE' diff --git a/plugins/plugins/core/qdn/browser/browser.src.js b/plugins/plugins/core/qdn/browser/browser.src.js index 4200dd0c..f00843b8 100644 --- a/plugins/plugins/core/qdn/browser/browser.src.js +++ b/plugins/plugins/core/qdn/browser/browser.src.js @@ -1895,13 +1895,13 @@ class WebBrowser extends LitElement { const requiredFields = ['coin','type'] const missingFields = [] - requiredFields.forEach((field) => { + requiredFields.forEach((field) => { if (!data[field]) { missingFields.push(field) } }) - if (missingFields.length > 0) { + if (missingFields.length > 0) { const missingFieldsString = missingFields.join(', ') const errorMsg = `Missing fields: ${missingFieldsString}` let data = {} @@ -2065,67 +2065,6 @@ class WebBrowser extends LitElement { } } - case actions.GET_DAY_SUMMARY: { - try { - let coin = data.coin; - let type = data.type; - response = await parentEpml.request('apiCall', { - type: 'api', - method: 'GET', - url: `/crosschain/${coin}/${type}?apiKey=${this.getApiKey()}`, - headers: { - 'Accept': '*/*', - 'Content-Type': 'application/json' - }, - }) - } catch (error) { - const data = {} - data['error'] = "Error in get foreign fee" - response = JSON.stringify(data) - } finally { - break - } - } - - case actions.UPDATE_FOREIGN_FEE: { - const requiredFields = ['coin','type'] - const missingFields = [] - requiredFields.forEach((field) => { - if (!data[field]) { - missingFields.push(field) - } - }) - if (missingFields.length > 0) { - const missingFieldsString = missingFields.join(', ') - const errorMsg = `Missing fields: ${missingFieldsString}` - let data = {} - data['error'] = errorMsg - response = JSON.stringify(data) - break - } - try { - let coin = data.coin; - let type = data.type; - let value = data.value; - response = await parentEpml.request('apiCall', { - type: 'api', - method: 'POST', - url: `/crosschain/${coin}/update${type}?apiKey=${this.getApiKey()}`, - headers: { - 'Accept': '*/*', - 'Content-Type': 'application/json' - }, - body: `${value}` - }) - } catch (error) { - const data = {} - data['error'] = "Error in update foreign fee" - response = JSON.stringify(data) - } finally { - break - } - } - case actions.GET_DAY_SUMMARY: { try { response = await parentEpml.request('apiCall', { @@ -4069,4 +4008,4 @@ async function showErrorAndWait(type, data, data1) { // Add the styles for the modal const styleSheet = new CSSStyleSheet() styleSheet.replaceSync(webBrowserModalStyles) -document.adoptedStyleSheets = [styleSheet] \ No newline at end of file +document.adoptedStyleSheets = [styleSheet]