Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enabe RBF by default #2163

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions e2e/boost.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ d('Boost', () => {
return;
}

// switch off RBF mode
await element(by.id('Settings')).tap();
if (!__DEV__) {
await element(by.id('DevOptions')).multiTap(5); // enable dev mode
}
await element(by.id('DevSettings')).tap();
await element(by.id('RBF')).tap();
await launchAndWait();

// fund the wallet
await element(by.id('Receive')).tap();
let { label: wAddress } = await element(by.id('QRCode')).getAttributes();
Expand All @@ -76,11 +85,10 @@ d('Boost', () => {
await sleep(500); // wait for keyboard to hide
await element(by.id('AddressContinue')).tap();
await element(by.id('N1').withAncestor(by.id('SendAmountNumberPad'))).tap();
for (let i = 0; i < 4; i++) {
await element(
by.id('N0').withAncestor(by.id('SendAmountNumberPad')),
).tap();
}
await element(by.id('N0').withAncestor(by.id('SendAmountNumberPad'))).tap();
await element(
by.id('N000').withAncestor(by.id('SendAmountNumberPad')),
).tap();
await expect(element(by.text('10 000'))).toBeVisible();
await element(by.id('ContinueAmount')).tap();
await element(by.id('GRAB')).swipe('right', 'slow', 0.95, 0.5, 0.5); // Swipe to confirm
Expand Down Expand Up @@ -164,15 +172,6 @@ d('Boost', () => {
return;
}

// switch to RBF mode
await element(by.id('Settings')).tap();
if (!__DEV__) {
await element(by.id('DevOptions')).multiTap(5); // enable dev mode
}
await element(by.id('DevSettings')).tap();
await element(by.id('RBF')).tap();
await launchAndWait();

// fund the wallet
await element(by.id('Receive')).tap();
let { label: wAddress } = await element(by.id('QRCode')).getAttributes();
Expand All @@ -197,11 +196,10 @@ d('Boost', () => {
await sleep(500); // wait for keyboard to hide
await element(by.id('AddressContinue')).tap();
await element(by.id('N1').withAncestor(by.id('SendAmountNumberPad'))).tap();
for (let i = 0; i < 4; i++) {
await element(
by.id('N0').withAncestor(by.id('SendAmountNumberPad')),
).tap();
}
await element(by.id('N0').withAncestor(by.id('SendAmountNumberPad'))).tap();
await element(
by.id('N000').withAncestor(by.id('SendAmountNumberPad')),
).tap();
await expect(element(by.text('10 000'))).toBeVisible();
await element(by.id('ContinueAmount')).tap();
await element(by.id('GRAB')).swipe('right', 'slow', 0.95, 0.5, 0.5); // Swipe to confirm
Expand Down
2 changes: 1 addition & 1 deletion src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const persistConfig = {
key: 'root',
storage: reduxStorage,
// increase version after store shape changes
version: 44,
version: 45,
stateReconciler: autoMergeLevel2,
blacklist: ['receive', 'ui'],
migrate: createMigrate(migrations, { debug: __ENABLE_MIGRATION_DEBUG__ }),
Expand Down
9 changes: 9 additions & 0 deletions src/store/migrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ const migrations = {
},
};
},
45: (state): PersistedState => {
return {
...state,
settings: {
...state.settings,
rbf: true,
},
};
},
};

export default migrations;
2 changes: 1 addition & 1 deletion src/store/shapes/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const initialSettingsState: TSettings = {
pinOnIdle: false,
pinForPayments: false,
biometrics: false,
rbf: false,
rbf: true,
theme: 'dark',
unit: EUnit.BTC,
denomination: EDenomination.modern,
Expand Down
Loading