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

Commit eeef65d

Browse files
committed
Change default bitcoin display unit to sat
1 parent 71c2c8a commit eeef65d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ module.exports.FIATS = {
3939
eur: { display: '€', displayLong: 'Euro' },
4040
gbp: { display: '£', displayLong: 'British Pound' },
4141
};
42-
module.exports.DEFAULT_UNIT = 'btc';
42+
module.exports.DEFAULT_UNIT = 'sat';
4343
module.exports.DEFAULT_FIAT = 'usd';

test/unit/action/app-storage.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ describe('Action App Storage Unit Tests', () => {
2828
it('should use default if nothing is saved yet', async () => {
2929
AsyncStorageStub.getItem.resolves(undefined);
3030
await db.restore(AsyncStorageStub);
31-
expect(store.settings.unit, 'to equal', 'btc');
31+
expect(store.settings.unit, 'to equal', 'sat');
3232
expect(logger.error, 'was not called');
3333
expect(store.loaded, 'to be', true);
3434
});
3535

3636
it('should set supported setting', async () => {
3737
AsyncStorageStub.getItem
3838
.withArgs('settings')
39-
.resolves(JSON.stringify({ unit: 'sat' }));
39+
.resolves(JSON.stringify({ unit: 'btc' }));
4040
await db.restore(AsyncStorageStub);
41-
expect(store.settings.unit, 'to equal', 'sat');
41+
expect(store.settings.unit, 'to equal', 'btc');
4242
expect(store.loaded, 'to be', true);
4343
});
4444

test/unit/computed/setting.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ describe('Computed Settings Unit Tests', () => {
1111
describe('ComputedSetting()', () => {
1212
it('should work with initial store', () => {
1313
ComputedSetting(store);
14-
expect(store.selectedUnitLabel, 'to equal', 'Bitcoin');
14+
expect(
15+
store.selectedUnitLabel,
16+
'to match',
17+
/Satoshi {3}\(0[,.]00000001 BTC\)/
18+
);
1519
expect(store.selectedFiatLabel, 'to equal', 'US Dollar');
1620
expect(store.satUnitLabel, 'to be ok');
1721
expect(store.bitUnitLabel, 'to be ok');
@@ -22,13 +26,9 @@ describe('Computed Settings Unit Tests', () => {
2226
});
2327

2428
it('should display satoshis denominated in BTC', () => {
25-
store.settings.unit = 'sat';
29+
store.settings.unit = 'btc';
2630
ComputedSetting(store);
27-
expect(
28-
store.selectedUnitLabel,
29-
'to match',
30-
/Satoshi {3}\(0[,.]00000001 BTC\)/
31-
);
31+
expect(store.selectedUnitLabel, 'to equal', 'Bitcoin');
3232
});
3333
});
3434
});

0 commit comments

Comments
 (0)