mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-03-28 08:15:55 +00:00
added is local condition
This commit is contained in:
parent
3f1a035b7c
commit
e9860ae7be
@ -20,7 +20,6 @@ import Base58 from "../deps/Base58";
|
|||||||
import {
|
import {
|
||||||
base64ToUint8Array,
|
base64ToUint8Array,
|
||||||
decryptDeprecatedSingle,
|
decryptDeprecatedSingle,
|
||||||
decryptGroupData,
|
|
||||||
decryptGroupDataQortalRequest,
|
decryptGroupDataQortalRequest,
|
||||||
encryptDataGroup,
|
encryptDataGroup,
|
||||||
uint8ArrayStartsWith,
|
uint8ArrayStartsWith,
|
||||||
@ -29,15 +28,14 @@ import {
|
|||||||
import { publishData } from "../qdn/publish/pubish";
|
import { publishData } from "../qdn/publish/pubish";
|
||||||
import { getPermission, setPermission } from "../qortalRequests";
|
import { getPermission, setPermission } from "../qortalRequests";
|
||||||
import { createTransaction } from "../transactions/transactions";
|
import { createTransaction } from "../transactions/transactions";
|
||||||
import { fileToBase64 } from "../utils/fileReading";
|
|
||||||
import { mimeToExtensionMap } from "../utils/memeTypes";
|
import { mimeToExtensionMap } from "../utils/memeTypes";
|
||||||
|
|
||||||
|
|
||||||
const btcFeePerByte = 0.00000100
|
const btcFeePerByte = 0.00000100
|
||||||
const ltcFeePerByte = 0.00000030
|
const ltcFeePerByte = 0.00000030
|
||||||
const dogeFeePerByte = 0.00001000
|
const dogeFeePerByte = 0.00001000
|
||||||
const dgbFeePerByte = 0.00000010
|
const dgbFeePerByte = 0.00000010
|
||||||
const rvnFeePerByte = 0.00001125
|
const rvnFeePerByte = 0.00001125
|
||||||
|
|
||||||
|
|
||||||
const _createPoll = async (pollName, pollDescription, options) => {
|
const _createPoll = async (pollName, pollDescription, options) => {
|
||||||
@ -401,6 +399,8 @@ export const decryptData = async (data) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getListItems = async (data) => {
|
export const getListItems = async (data) => {
|
||||||
|
const localNodeAvailable = await isUsingLocal()
|
||||||
|
if(!localNodeAvailable) throw new Error('Please use your local node.')
|
||||||
const requiredFields = ["list_name"];
|
const requiredFields = ["list_name"];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
requiredFields.forEach((field) => {
|
requiredFields.forEach((field) => {
|
||||||
@ -454,6 +454,8 @@ export const getListItems = async (data) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const addListItems = async (data) => {
|
export const addListItems = async (data) => {
|
||||||
|
const localNodeAvailable = await isUsingLocal()
|
||||||
|
if(!localNodeAvailable) throw new Error('Please use your local node.')
|
||||||
const requiredFields = ["list_name", "items"];
|
const requiredFields = ["list_name", "items"];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
requiredFields.forEach((field) => {
|
requiredFields.forEach((field) => {
|
||||||
@ -507,6 +509,8 @@ export const addListItems = async (data) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const deleteListItems = async (data) => {
|
export const deleteListItems = async (data) => {
|
||||||
|
const localNodeAvailable = await isUsingLocal()
|
||||||
|
if(!localNodeAvailable) throw new Error('Please use your local node.')
|
||||||
const requiredFields = ["list_name", "item"];
|
const requiredFields = ["list_name", "item"];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
requiredFields.forEach((field) => {
|
requiredFields.forEach((field) => {
|
||||||
@ -1726,6 +1730,8 @@ export const getTxActivitySummary = async (data) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const updateForeignFee = async (data) => {
|
export const updateForeignFee = async (data) => {
|
||||||
|
const localNodeAvailable = await isUsingLocal()
|
||||||
|
if(!localNodeAvailable) throw new Error('Please use your local node.')
|
||||||
const requiredFields = ['coin', 'type', 'value'];
|
const requiredFields = ['coin', 'type', 'value'];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
|
|
||||||
@ -1821,6 +1827,8 @@ export const getTxActivitySummary = async (data) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const setCurrentForeignServer = async (data) => {
|
export const setCurrentForeignServer = async (data) => {
|
||||||
|
const localNodeAvailable = await isUsingLocal()
|
||||||
|
if(!localNodeAvailable) throw new Error('Please use your local node.')
|
||||||
const requiredFields = ['coin'];
|
const requiredFields = ['coin'];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
|
|
||||||
@ -1878,6 +1886,8 @@ export const getTxActivitySummary = async (data) => {
|
|||||||
|
|
||||||
|
|
||||||
export const addForeignServer = async (data) => {
|
export const addForeignServer = async (data) => {
|
||||||
|
const localNodeAvailable = await isUsingLocal()
|
||||||
|
if(!localNodeAvailable) throw new Error('Please use your local node.')
|
||||||
const requiredFields = ['coin'];
|
const requiredFields = ['coin'];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
|
|
||||||
@ -1934,6 +1944,8 @@ export const getTxActivitySummary = async (data) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const removeForeignServer = async (data) => {
|
export const removeForeignServer = async (data) => {
|
||||||
|
const localNodeAvailable = await isUsingLocal()
|
||||||
|
if(!localNodeAvailable) throw new Error('Please use your local node.')
|
||||||
const requiredFields = ['coin'];
|
const requiredFields = ['coin'];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user