Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version: 0.8.0; move NAME_STATES to constant #367

Merged
merged 1 commit into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/background/wallet/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {renewMany} from "./bulk-renewal";
import {getStats} from "./stats";
import {get, put} from "../db/service";
import hsdLedger from 'hsd-ledger';
import {NAME_STATES} from "../../ducks/names";
import {NAME_STATES} from "../../constants/names";

const WalletNode = require('hsd/lib/wallet/node');
const TX = require('hsd/lib/primitives/tx');
Expand All @@ -38,7 +38,6 @@ const Covenant = require('hsd/lib/primitives/covenant');
const common = require('hsd/lib/wallet/common');
const ipc = require('electron').ipcMain;


const randomAddrs = {
[NETWORKS.TESTNET]: 'ts1qfcljt5ylsa9rcyvppvl8k8gjnpeh079drfrmzq',
[NETWORKS.REGTEST]: 'rs1qh57neh8npuxeyxfsl35373vshs0d40cvxx57aj',
Expand Down Expand Up @@ -1311,7 +1310,7 @@ const methods = {
importName: service.importName,
rpcGetWalletInfo: service.rpcGetWalletInfo,
listWallets: service.listWallets,
getStats: service.getStats,
getStats: service.getStats,
};

export async function start(server) {
Expand Down
8 changes: 8 additions & 0 deletions app/constants/names.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const NAME_STATES = {
OPENING: 'OPENING',
BIDDING: 'BIDDING',
REVEAL: 'REVEAL',
CLOSED: 'CLOSED',
REVOKED: 'REVOKED',
TRANSFER: 'TRANSFER',
};
11 changes: 1 addition & 10 deletions app/ducks/names.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
waitForWalletSync,
} from './walletActions';
import { SET_NAME } from './namesReducer';
import {NAME_STATES} from "../constants/names";

export const RECORD_TYPE = {
DS: 'DS',
Expand All @@ -31,16 +32,6 @@ export const DROPDOWN_TYPES = [
{label: RECORD_TYPE.TXT},
];

// Other Constants
export const NAME_STATES = {
OPENING: 'OPENING',
BIDDING: 'BIDDING',
REVEAL: 'REVEAL',
CLOSED: 'CLOSED',
REVOKED: 'REVOKED',
TRANSFER: 'TRANSFER',
};

export const fetchName = name => async (dispatch, getState) => {
const {names} = getState();
const existing = names[name];
Expand Down
2 changes: 1 addition & 1 deletion app/pages/YourBids/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import c from "classnames";
import * as nameActions from "../../ducks/names";
import * as notifActions from "../../ducks/notifications";
import dbClient from "../../utils/dbClient";
import {NAME_STATES} from "../../ducks/names";
import {NAME_STATES} from "../../constants/names";

const analytics = aClientStub(() => require('electron').ipcRenderer);

Expand Down
Loading