Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit bb5ef38

Browse files
committed
Set displayFiat to true by default in store
Fix unit tests to handle default fiat display
1 parent de83fad commit bb5ef38

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class Store {
6868
settings: {
6969
unit: DEFAULT_UNIT,
7070
fiat: DEFAULT_FIAT,
71-
displayFiat: false,
71+
displayFiat: true,
7272
exchangeRate: {},
7373
},
7474
});

test/unit/computed/wallet.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ describe('Computed Wallet Unit Tests', () => {
1212
it('should work with initial store', () => {
1313
ComputedWallet(store);
1414
expect(store.walletAddressUri, 'to equal', '');
15-
expect(store.depositLabel, 'to equal', '0');
16-
expect(store.channelBalanceLabel, 'to equal', '0');
17-
expect(store.unitFiatLabel, 'to equal', 'BTC');
18-
expect(store.unitLabel, 'to equal', 'BTC');
15+
expect(store.depositLabel, 'to match', /0[,.]00/);
16+
expect(store.channelBalanceLabel, 'to match', /0[,.]00/);
17+
expect(store.unitFiatLabel, 'to equal', '$');
18+
expect(store.unitLabel, 'to equal', null);
1919
});
2020

2121
it('should generate valid wallet address uri', () => {

test/unit/store.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ describe('Store Unit Tests', () => {
99

1010
describe('init()', () => {
1111
it('should set computed vales', () => {
12-
expect(store.unitLabel, 'to be', undefined);
12+
expect(store.unitFiatLabel, 'to be', undefined);
1313
store.init();
14-
expect(store.unitLabel, 'to equal', 'BTC');
14+
expect(store.unitFiatLabel, 'to equal', '$');
1515
});
1616
});
1717
});

0 commit comments

Comments
 (0)