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

Commit c7c1679

Browse files
committed
Rename Deposit nav action
1 parent cf327fd commit c7c1679

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

src/action/nav.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ class NavAction {
120120
this._store.route = 'CreateChannel';
121121
}
122122

123-
goFundWallet() {
123+
goDeposit() {
124124
this._store.displayCopied = false;
125-
this._store.route = 'FundWallet';
125+
this._store.route = 'Deposit';
126126
}
127127
}
128128

src/view/home.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const HomeView = ({
5353
goSettings={() => nav.goSettings()}
5454
showChannelAlert={store.showChannelAlert}
5555
/>
56-
<QrCodeSeparator goFundWallet={() => nav.goFundWallet()} />
56+
<QrCodeSeparator goDeposit={() => nav.goDeposit()} />
5757
<MainContent style={styles.content}>
5858
<BalanceDisplay
5959
balanceLabel={balanceLabel}
@@ -240,18 +240,18 @@ const qrStyles = StyleSheet.create({
240240
},
241241
});
242242

243-
const QrCodeSeparator = ({ goFundWallet }) => (
243+
const QrCodeSeparator = ({ goDeposit }) => (
244244
<View style={qrStyles.wrapper}>
245245
<View style={qrStyles.separator} />
246-
<QrButton image="qr" onPress={goFundWallet} style={qrStyles.button}>
246+
<QrButton image="qr" onPress={goDeposit} style={qrStyles.button}>
247247
Add coin
248248
</QrButton>
249249
<View style={qrStyles.separator} />
250250
</View>
251251
);
252252

253253
QrCodeSeparator.propTypes = {
254-
goFundWallet: PropTypes.func.isRequired,
254+
goDeposit: PropTypes.func.isRequired,
255255
};
256256

257257
export default observer(HomeView);

src/view/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class MainView extends Component {
111111
{route === 'InvoiceQR' && (
112112
<InvoiceQR store={store} invoice={invoice} nav={nav} />
113113
)}
114-
{route === 'FundWallet' && (
114+
{route === 'Deposit' && (
115115
<Deposit store={store} invoice={invoice} nav={nav} />
116116
)}
117117
{route === 'Channels' && (

test/unit/action/nav.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ describe('Action Nav Unit Tests', () => {
132132

133133
describe('goInvoiceQR()', () => {
134134
it('should set correct route', () => {
135+
store.displayCopied = true;
135136
nav.goInvoiceQR();
136137
expect(store.route, 'to equal', 'InvoiceQR');
138+
expect(store.displayCopied, 'to be', false);
137139
});
138140
});
139141

@@ -213,4 +215,13 @@ describe('Action Nav Unit Tests', () => {
213215
expect(store.route, 'to equal', 'CreateChannel');
214216
});
215217
});
218+
219+
describe('goDeposit()', () => {
220+
it('should set correct route', () => {
221+
store.displayCopied = true;
222+
nav.goDeposit();
223+
expect(store.route, 'to equal', 'Deposit');
224+
expect(store.displayCopied, 'to be', false);
225+
});
226+
});
216227
});

0 commit comments

Comments
 (0)