Skip to content

Commit

Permalink
Merge branch 'main' into fix/transaction-address-input
Browse files Browse the repository at this point in the history
  • Loading branch information
iGroza authored and iGroza committed Mar 14, 2024
2 parents e0f46df + 46908bd commit 4a82fc0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
17 changes: 11 additions & 6 deletions e2e/4_settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@ describe('Routine', () => {
}
await device.enableSynchronization();

for (const word of mnemonic_words) {
await waitFor(element(by.text(word)))
.toBeVisible()
for (let i = 0; i < mnemonic_words.length; i++) {
await waitFor(
element(by.id(`settings_view_recovery_phrase_word_${i + 1}`)),
)
.toHaveText(mnemonic_words[i])
.withTimeout(1000);
}

Expand All @@ -238,9 +240,12 @@ describe('Routine', () => {
}
await device.enableSynchronization();

for (const word of secondMnemonic.split(' ')) {
await waitFor(element(by.text(word)))
.toBeVisible()
const secondMnemonicArray = secondMnemonic.split(' ');
for (let i = 0; i < secondMnemonicArray.length; i++) {
await waitFor(
element(by.id(`settings_view_recovery_phrase_word_${i + 1}`)),
)
.toHaveText(secondMnemonicArray[i])
.withTimeout(1000);
}
/* #endregion */
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"devmode:ios": "xcrun simctl openurl booted haqq:enableDeveloperMode:true",
"devmode:android": "adb shell am start -a android.intent.action.VIEW -d haqq:enableDeveloperMode:true",
"clean": "sh ./scripts/clean.sh",
"update-inpage-bridge-web3": "sh ./scripts/update-inpage-bridge-web3.sh"
"update-inpage-bridge-web3": "sh ./scripts/update-inpage-bridge-web3.sh",
"git:action:restart": "git pull && git commit --amend -n --no-edit && git push -f"
},
"dependencies": {
"@birdwingo/react-native-spinning-numbers": "1.0.5",
Expand Down
9 changes: 7 additions & 2 deletions src/components/transaction-address.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useCallback, useState} from 'react';
import React, {useCallback, useMemo, useState} from 'react';

import {
ListRenderItem,
Expand Down Expand Up @@ -64,6 +64,11 @@ export const TransactionAddress = ({
}: TransactionAddressProps) => {
const {keyboardShown} = useKeyboard();
const [error, setError] = useState(false);

const doneDisabled = useMemo(() => {
return !address?.trim() || error || !AddressUtils.isValidAddress(address);
}, [error, address]);

const onDone = useCallback(async () => {
onAddress(address.trim());
}, [onAddress, address]);
Expand Down Expand Up @@ -230,7 +235,7 @@ export const TransactionAddress = ({
)}
<Spacer flex={1} />
<Button
disabled={error}
disabled={doneDisabled}
variant={ButtonVariant.contained}
i18n={I18N.continue}
onPress={onDone}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ export const TransactionConfirmationScreen = observer(() => {

const ethNetworkProvider = new EthNetwork();

const provider = await getProviderInstanceForWallet(wallet);
const provider = await getProviderInstanceForWallet(
wallet,
false,
true,
);

let transaction;
if (token.is_erc20) {
Expand Down

0 comments on commit 4a82fc0

Please sign in to comment.