Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
fix(Cash): mark bch.imported as having bch coinCode
Browse files Browse the repository at this point in the history
  • Loading branch information
Thore3 committed Oct 10, 2017
1 parent 3d881ee commit cebbf92
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bch/bch-imported.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class BchImported extends BchSpendable {
return balances.every(x => x == null) ? null : sumNonNull(balances)

This comment has been minimized.

Copy link
@malabudala

malabudala Nov 22, 2017

(X=>X== null)

}

get coinCode () {

This comment has been minimized.

Copy link
@malabudala
return 'bch'
}

getAvailableBalance (feePerByte) {
return super.getAvailableBalance(this.addresses, feePerByte)
}
Expand Down
4 changes: 4 additions & 0 deletions tests/bch/bch-account.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ describe('BchAccount', () => {
expect(account.label).toEqual('Bitcoin Cash - My Wallet')
})

it('should have: coinCode=bch', () => {
expect(account.coinCode).toEqual('bch')
})

it('should have: balance', () => {
spyOn(BchSpendable.prototype, 'getAddressBalance').and.callThrough()
expect(account.balance).toEqual(null)
Expand Down
4 changes: 4 additions & 0 deletions tests/bch/bch-imported.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ describe('BchImported', () => {
expect(imported.label).toEqual('Imported Addresses')
})

it('should have: coinCode=bch', () => {
expect(imported.coinCode).toEqual('bch')
})

it('should have: balance (null)', () => {
spyOn(BchSpendable.prototype, 'getAddressBalance').and.returnValue(null)
expect(imported.balance).toEqual(null)
Expand Down

0 comments on commit cebbf92

Please sign in to comment.