Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* problem: incorrect coin ticker on tx details page * solution: MultiCreateTransaction refactoring * solution: fixed @emeraldwallet/erc20 build * solution: store package build fix * solution: devDependecies lookup added to tslint * solution: show known tokens balances * solution: fixed deposit button in accounts lint * solution: workflow -> core/workflow
- Loading branch information
Showing
372 changed files
with
6,197 additions
and
5,178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {Currency, CurrencyCode} from "./Currency"; | ||
import { Currency, CurrencyCode } from './Currency'; | ||
|
||
describe('Currency', () => { | ||
it('should format', () => { | ||
expect(Currency.format(5, CurrencyCode.USD)).toEqual('$5.00'); | ||
}) | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import ILogger from './ILogger'; | ||
|
||
export default class DefaultLogger implements ILogger { | ||
debug(...params: any[]) { | ||
public debug (...params: any[]) { | ||
|
||
}; | ||
error(...params: any[]) { | ||
} | ||
public error (...params: any[]) { | ||
|
||
}; | ||
warn(...params: any[]) { | ||
} | ||
public warn (...params: any[]) { | ||
|
||
}; | ||
info(...params: any[]) { | ||
} | ||
public info (...params: any[]) { | ||
|
||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
export interface IAccount { | ||
id: string; | ||
blockchain: any; | ||
readonly id: string; | ||
readonly blockchain: any; | ||
hdpath?: string; | ||
hardware?: boolean; | ||
hidden?: boolean; | ||
balance?: any; | ||
name?: string; | ||
description?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import {Vault} from "@emeraldplatform/vault"; | ||
import {BlockchainCode} from './blockchains/blockchains'; | ||
import {EthRpc} from "@emeraldplatform/eth-rpc"; | ||
import { EthRpc } from '@emeraldplatform/eth-rpc'; | ||
import { Vault } from '@emeraldplatform/vault'; | ||
import { BlockchainCode } from './blockchains'; | ||
|
||
/** | ||
* Backend API - Emerald vault and Ethereum-like RPC | ||
*/ | ||
export interface IApi { | ||
emerald: Vault; | ||
chain(name: BlockchainCode | string): EthRpc; | ||
chain (name: BlockchainCode | string): EthRpc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import {Vault} from "@emeraldplatform/vault"; | ||
import {BlockchainCode} from './blockchains/blockchains'; | ||
import {EthRpc} from "@emeraldplatform/eth-rpc"; | ||
import { EthRpc } from '@emeraldplatform/eth-rpc'; | ||
import { Vault } from '@emeraldplatform/vault'; | ||
import { BlockchainCode } from './blockchains/blockchains'; | ||
|
||
export interface IServerConnect { | ||
connectEmerald(): Vault; | ||
connectEthChain(name: BlockchainCode): null | EthRpc; | ||
connectEmerald (): Vault; | ||
connectEthChain (name: BlockchainCode): null | EthRpc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ describe('Units', () => { | |
const u = new Units('qwqwerwe', 2); | ||
}).toThrow(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import BlockchainParams from "./BlockchainParams"; | ||
import BlockchainParams from './BlockchainParams'; | ||
|
||
export interface Blockchain { | ||
params: BlockchainParams; | ||
|
||
isValidAddress(address: string): boolean; | ||
getTitle(): string; | ||
isValidAddress (address: string): boolean; | ||
getTitle (): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export enum CoinTicker { | ||
ETC = "ETC", | ||
ETH = "ETH", | ||
BTC = "BTC", | ||
MORDEN = "MORDEN", | ||
KOVAN = "KOVAN" | ||
ETC = 'ETC', | ||
ETH = 'ETH', | ||
BTC = 'BTC', | ||
MORDEN = 'MORDEN', | ||
KOVAN = 'KOVAN' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
import { BlockchainCode } from "./blockchains"; | ||
import { BlockchainCode, isValidChain } from './blockchains'; | ||
|
||
describe('BlockchainCode', () => { | ||
it('should contain codes', () => { | ||
expect(BlockchainCode.ETC).toEqual('etc'); | ||
}) | ||
}); | ||
|
||
it('should be able to validate chain code', () => { | ||
expect(isValidChain('etc')).toBeTruthy(); | ||
expect(isValidChain('ETC')).toBeFalsy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { BlockchainCode } from '../blockchains'; | ||
import { CoinTicker } from '../CoinTicker'; | ||
import Ethereum from './Ethereum'; | ||
import EthereumParams from "./EthereumParams"; | ||
import {BlockchainCode} from "../blockchains"; | ||
import {CoinTicker} from "../CoinTicker"; | ||
import EthereumParams from './EthereumParams'; | ||
|
||
describe('Ethereum', () => { | ||
it('should have coin ticker ETH', () => { | ||
expect(new Ethereum(new EthereumParams(BlockchainCode.ETH, CoinTicker.ETH, 1, "m/44'/60'/160720'/0'"), "Ethereum").params.coinTicker).toEqual('ETH'); | ||
}) | ||
expect(new Ethereum(new EthereumParams(BlockchainCode.ETH, CoinTicker.ETH, 1, "m/44'/60'/160720'/0'"), 'Ethereum').params.coinTicker).toEqual('ETH'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import {EthAddress} from '@emeraldplatform/core'; | ||
import {Blockchain} from "../Blockchain"; | ||
import BlockchainParams from "../BlockchainParams"; | ||
import { EthAddress } from '@emeraldplatform/core'; | ||
import { Blockchain } from '../Blockchain'; | ||
import BlockchainParams from '../BlockchainParams'; | ||
|
||
export default class Ethereum implements Blockchain { | ||
params: BlockchainParams; | ||
title: string; | ||
public params: BlockchainParams; | ||
public title: string; | ||
|
||
constructor(params: BlockchainParams, title: string) { | ||
constructor (params: BlockchainParams, title: string) { | ||
this.params = params; | ||
this.title = title; | ||
} | ||
|
||
isValidAddress(address: string): boolean { | ||
public isValidAddress (address: string): boolean { | ||
return EthAddress.fromHexString(address).isValid(); | ||
} | ||
|
||
getTitle(): string { | ||
public getTitle (): string { | ||
return this.title; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.