Skip to content

Commit

Permalink
version: 0.8.0; move NAME_STATES to constant (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
chikeichan authored Jun 15, 2021
1 parent 08979ae commit c78e784
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 18,636 deletions.
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

0 comments on commit c78e784

Please sign in to comment.