Plugin Forked from Airbitz https://github.com/leongaban/edge-currency-decred
-
Setup and run a Decred full node locally
-
Setup and run ElectrumX server (requires leveldb)
Verifying my Blockstack ID is secured with the address 1KWPiFTX9JFUVcYS9KH1GDMi9AZNHUpgBz https://explorer.blockstack.org/address/1KWPiFTX9JFUVcYS9KH1GDMi9AZNHUpgBz |
// https://tinyurl.com/nFormatter | |
export const nFormatter = (num: number, digits: number) => { | |
const si = [ | |
{ value: 1, symbol: "" }, | |
{ value: 1E3, symbol: "k" }, | |
{ value: 1E6, symbol: "M" }, | |
{ value: 1E9, symbol: "G" }, | |
{ value: 1E12, symbol: "T" }, | |
{ value: 1E15, symbol: "P" }, | |
{ value: 1E18, symbol: "E" } |
import LiquidityPoolApi from './LiquidityPool'; | |
const endpoint = '/frontoffice/api/liquidity-pool/get-total-payout'; | |
jest.mock(endpoint, () => ({ | |
getUsersTotalPayout: jest.fn(() => Promise.resolve({ data: { payout: 100.21 } })) | |
})); | |
describe('LiquidityPool API: getUsersTotalPayout', () => { | |
it('should make a request when we get images', () => { |
import { bind } from 'decko'; | |
import BaseApi from './Base'; | |
import * as NS from './types'; | |
class LiquidityPoolApi extends BaseApi { | |
@bind | |
public async getUsersTotalPayout(userId: string): Promise<number> { | |
const params: NS.IGetUsersTotalPayoutRequest = { userId }; |
#!/usr/bin/env bash | |
JEST=node_modules/jest/bin/jest.js | |
HELP_TEXT="\n\n\tPass a target with '-t' or '--target'.\n" | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
POSITIONAL=() | |
while [[ $# -gt 0 ]] | |
do |
// @flow | |
import type { | |
AbcCorePluginOptions, | |
AbcCurrencyInfo, | |
AbcCurrencyPlugin, | |
AbcCurrencyPluginFactory | |
} from 'edge-login' | |
import bcoin from 'bcoin' | |
// Coins Plugin Info |
// @flow | |
import type { AbcCurrencyInfo } from 'edge-login' | |
export const decredInfo: AbcCurrencyInfo = { | |
// Basic currency information: | |
currencyCode: 'DCR', | |
currencyName: 'Decred', | |
pluginName: 'decred', | |
denominations: [{ name: 'DCR', multiplier: '100000000', symbol: 'D' }], | |
walletTypes: ['wallet:decred-blake256', 'wallet:decred'], |
// @flow | |
import type { | |
AbcCorePluginOptions, | |
AbcCurrencyEngine, | |
AbcCurrencyEngineOptions, | |
AbcCurrencyInfo, | |
AbcCurrencyPlugin, | |
AbcEncodeUri, | |
AbcIo, | |
AbcParsedUri, |
Plugin Forked from Airbitz https://github.com/leongaban/edge-currency-decred
Setup and run a Decred full node locally
Setup and run ElectrumX server (requires leveldb)
# Replace REL_BRANCH with the appropriate name | |
git fetch --all --prune && git branch --merged | egrep -v "(^\*|REL_BRANCH|master)" | xargs -I % sh -c 'git branch -d %1; git push origin :%1;' |