Skip to content

Commit

Permalink
Rename returnTxHashAsap to mobileReturnTxHashAsap
Browse files Browse the repository at this point in the history
  • Loading branch information
dan437 committed Nov 14, 2024
1 parent 42e2c7e commit da66442
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions app/reducers/swaps/swaps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const DEFAULT_FEATURE_FLAGS = {
smartTransactions: {
expectedDeadline: 45,
maxDeadline: 150,
returnTxHashAsap: false,
mobileReturnTxHashAsap: false,
},
},
bsc: {
Expand Down Expand Up @@ -90,7 +90,7 @@ describe('swaps reducer', () => {
smartTransactions: {
expectedDeadline: 45,
maxDeadline: 150,
returnTxHashAsap: false,
mobileReturnTxHashAsap: false,
},
};

Expand Down Expand Up @@ -122,7 +122,7 @@ describe('swaps reducer', () => {
smartTransactions: {
expectedDeadline: 45,
maxDeadline: 150,
returnTxHashAsap: false,
mobileReturnTxHashAsap: false,
},
};

Expand Down Expand Up @@ -154,7 +154,7 @@ describe('swaps reducer', () => {
smartTransactions: {
expectedDeadline: 45,
maxDeadline: 150,
returnTxHashAsap: false,
mobileReturnTxHashAsap: false,
},
};

Expand Down Expand Up @@ -226,7 +226,7 @@ describe('swaps reducer', () => {
smartTransactions: {
expectedDeadline: 45,
maxDeadline: 150,
returnTxHashAsap: false,
mobileReturnTxHashAsap: false,
},
},
},
Expand Down Expand Up @@ -281,7 +281,7 @@ describe('swaps reducer', () => {
smartTransactions: {
expectedDeadline: 45,
maxDeadline: 150,
returnTxHashAsap: false,
mobileReturnTxHashAsap: false,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion app/selectors/smartTransactionsController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const getDefaultState = () => {
smartTransactions: {
expectedDeadline: 45,
maxDeadline: 160,
returnTxHashAsap: false,
mobileReturnTxHashAsap: false,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions app/util/smart-transactions/smart-publish-hook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function withRequest<ReturnValue>(
smartTransactions: {
expectedDeadline: 45,
maxDeadline: 150,
returnTxHashAsap: false,
mobileReturnTxHashAsap: false,
},
mobile_active: true,
extension_active: true,
Expand Down Expand Up @@ -231,7 +231,7 @@ describe('submitSmartTransactionHook', () => {

it('returns a txHash asap if the feature flag requires it', async () => {
withRequest(async ({ request }) => {
request.featureFlags.smartTransactions.returnTxHashAsap = true;
request.featureFlags.smartTransactions.mobileReturnTxHashAsap = true;
const result = await submitSmartTransactionHook(request);
expect(result).toEqual({ transactionHash });
});
Expand Down
10 changes: 5 additions & 5 deletions app/util/smart-transactions/smart-publish-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface SubmitSmartTransactionRequest {
| {
expectedDeadline: number;
maxDeadline: number;
returnTxHashAsap: boolean;
mobileReturnTxHashAsap: boolean;
}
| Record<string, never>;
};
Expand All @@ -74,7 +74,7 @@ class SmartTransactionHook {
smartTransactions: {
expectedDeadline?: number;
maxDeadline?: number;
returnTxHashAsap?: boolean;
mobileReturnTxHashAsap?: boolean;
};
};
#shouldUseSmartTransaction: boolean;
Expand Down Expand Up @@ -262,10 +262,10 @@ class SmartTransactionHook {
uuid: string,
) => {
let transactionHash: string | undefined | null;
const returnTxHashAsap =
this.#featureFlags?.smartTransactions?.returnTxHashAsap;
const mobileReturnTxHashAsap =
this.#featureFlags?.smartTransactions?.mobileReturnTxHashAsap;

if (returnTxHashAsap && submitTransactionResponse?.txHash) {
if (mobileReturnTxHashAsap && submitTransactionResponse?.txHash) {
transactionHash = submitTransactionResponse.txHash;
} else {
transactionHash = await this.#waitForTransactionHash({
Expand Down

0 comments on commit da66442

Please sign in to comment.