Compare commits

..
Author SHA1 Message Date
Andrea Maria Piana 7a80746d21 set proxy to test
https://github.com/status-im/status-go/compare/a93c8572...ca7e72ec
2024-08-13 14:21:11 +01:00
Andrea Maria Piana 26fb0b20e7 update status-go version 2024-08-13 14:00:50 +01:00
Mohsen b47f53777d [#20971] fix: app crash when collectible max limit is nan (#20992) 2024-08-12 10:24:45 -03:00
Parvesh Monu 1d298d0a5d Improve theme switch (#20984) 2024-08-12 10:24:45 -03:00
Andrea Maria Piana b6f59bc5c0 update status-go version 2024-08-12 13:54:40 +01:00
Andrea Maria Piana 38dd9c46c2 update status-go version 2024-08-12 13:49:42 +01:00
Ulises Manuel 2b6e782e80 fix(wallet): Remove redirection to send flow when the user scans an address QR code (#20979) 2024-08-08 17:28:32 +01:00
Andrea Maria Piana c32f31f8cd update status-go version 2024-08-08 13:57:27 +01:00
flexsurfer 50e41c8ed5 Token-gated permissions are not displayed on community's homepage #20965 (#20976) 2024-08-08 13:50:14 +01:00
Siddarth Kumar 93b748a629 update status-go version to latest release 2024-08-07 14:50:33 +05:30
frankandSiddarth Kumar a324481206 chore:enable status proxy (#20931)
* feat_: enable status proxy

* chore: update jenkins lib

* chore: add missing env reference

---------

Co-authored-by: Siddarth Kumar <siddarthkay@gmail.com>
2024-08-07 14:46:44 +05:30
Jamie Caprani 254717971e Cherry pick to release branch (#20963) 2024-08-06 15:43:10 +01:00
Icaro Motta 05279c111e Bump status-go version 2024-08-02 11:20:20 -03:00
Lungu Cristian b4a49bfe55 Fix typed-data chainid check (#20943)
* fix: typed-data chainid check & toast on sign fail

* fix: parsing the chain-id and error-handling
2024-08-02 11:20:20 -03:00
Sean Hagstrom e5c3357317 fix: remove mobile-data sync setting inside legacy settings (#20942) 2024-08-02 11:20:20 -03:00
Parvesh Monu da2e5ff1c0 fix 'Usage data' bottom sheet reappears after reopening the app if you swipe it down on onboarding (#20945) 2024-08-02 11:20:20 -03:00
Parvesh Monu f69f075e29 fix Mobile app doesn't allow taking screenshots when the 'Block Screenshots' toggle is turned off (#20941) 2024-08-02 11:20:20 -03:00
Ulises Manuel 81350b978f fix(wallet): Error while bridging tokens due to bonderFees (#20929) 2024-08-02 11:20:20 -03:00
Brian Sztamfater f59dca0589 chore: bump react-native-camera-link version to Status fork to remove usage of ML Kit (#20891) 2024-08-02 11:20:20 -03:00
Brian Sztamfater 745e5d75fb fix(wallet): inverted values of receiver and sender when displaying bridging routes (#20893)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-08-02 11:20:20 -03:00
Mohamed Javid 7c6f2bf878 fix(android): send and bridge ERC-20 tokens (#20924)
This commit adds the missing "encodeFunctionCall" method in Android

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-08-02 11:20:20 -03:00
Icaro MottaandMohamed Javid 29203e57ec Update release branch 2.30.x (#20925)
* fix_: use usd as default currency (#20916)

This commit uses "usd" currency as default for the fiat price calculation for the tokens. 

Every currency has a different format - decimal which we need to rely on a separate RPC to fetch currency format and do the calculation. So, this PR will change to use usd as the default for v2.30.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>

* Bump status-go version

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Co-authored-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-07-30 16:09:44 -03:00
Icaro Motta 0f15c0192d Update release branch 2.30.x (#20903)
Revisions from develop:

- 59ceddbaa develop origin/develop fix(wallet): fix bridge transactions (#20902)
- 99ccbc338 Cover wallet send events with tests Part 2 #20411 #20533 (#20721)
- 8c2d5398b Enabling WalletConnect feature flag (#20906)
- 67c83b13e fix(wallet): remove edit routes button in bridging (#20874)
- 11a84ba14 feat(wallet): disable complex routing (#20901)
- 1f5bb579c chore(wallet): disable bridging on unsupported tokens (#20846)
- 4586f8007 Add toggle in advanced settings for mobile data
- 55c620e59 fix: create password for small screen (#20645)
- 525609f0a Wallet Activity: transactions are not sorted by time #20808 (#20862)
- 90653955a chore(settings): Disable telemetry option (#20881)
- d27ab756d fix_:display group message using the new ui (#20787)
- c6a1db633 ci: enable split apks & build only for arm64-v8a (#20683)
- 73777e052 Ensure keycard account can send transaction after upgrading from v1 to v2 #20552 (#20845)
- a6d3fc374 [#20524] fix: the missed keypairs are shown in the key pair list screen (#20888)
- a671c7083 fix broken screen and navigation when syncing fails (#20887)
- a45991b6d 🥅 Filter connected dapps based on testnet mode, reject proposals and requests gracefully (#20799)
- 2e9fa22e4 feat: wallet router v2 (#20631)
- 737d8c4d5 rename sub to fix error when requesting to join community (#20868)
- 3aa7e103f Sync process is blocked on Enabled notifications screen (#20883)
- c1d2d44da perf: Fix app freeze after login (#20729)
- 0fed8113d e2e: updated testnet switching and added one test into smoke
- 53c35cb55 fix(wallet): Linear gradient exception on invalid colors for watched account cards (#20854)
- be8236554 chore(settings)_: Remove testnet toggle from legacy advanced settings (#20875)
- eae8a6559 feat(wallet)_: Add beta info box in activity tab (#20873)
- fe54a25a3 fix: not clearing network & web3-wallet on logout (#20886)
- 15a4219ef Reject wallet-connect request by dragging the modal down (#20763) (#20836)
- 2ffbdac89 WalletConnect show expired toast (#20857)
- 402eb8397 fix Issue with scrolling WalletConnect transaction on Android (#20867)
- ff88049a0 Fix WalletConnect header alignment on Android (#20860)
- cee21241d WalletConnect no internet edge-cases (#20826)
- 60ad7c8a2 chore(tests): New match-strict? cljs.test directive (#20825)
- 4989c9278 fix_: Adding own address as saved addresses (#20839)
2024-07-30 11:28:07 -03:00
Andrea Maria Piana a1784c5e1f Merge branch 'develop' into release/2.30.x
https://github.com/status-im/status-go/compare/4a43b2b2...4a43b2b2
2024-07-24 13:48:37 +01:00
Andrea Maria Piana 45cf31d469 Enable lightclient by default 2024-07-05 09:22:33 +01:00
Andrea Maria Piana f958d95467 Bump status-go version 2024-07-05 09:21:52 +01:00
Andrea Maria Piana 894f8f26ee Bump release to 2.30.0 2024-07-05 09:20:15 +01:00
15 changed files with 98 additions and 128 deletions
+2 -3
View File
@@ -436,11 +436,10 @@ android-clean: ##@prepare Clean Gradle state
rm -rf ~/.gradle
android-ports: export FLOWSTORM_PORT ?= 7722
android-ports: export FLOWSTORM_PORT := 7722
android-ports: export TARGET := android-sdk
android-ports: export RCT_METRO_PORT ?= 8081
android-ports: ##@other Add proxies to Android Device/Simulator
adb reverse tcp:$(RCT_METRO_PORT) tcp:$(RCT_METRO_PORT) && \
adb reverse tcp:8081 tcp:8081 && \
adb reverse tcp:3449 tcp:3449 && \
adb reverse tcp:4567 tcp:4567 && \
adb reverse tcp:$(FLOWSTORM_PORT) tcp:$(FLOWSTORM_PORT) && \
+1 -1
View File
@@ -1 +1 @@
2.29.0
2.30.0
-2
View File
@@ -17,7 +17,6 @@
hermesEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_hermesEnabled" "true",
buildUrl ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_buildUrl" null,
statusGoSrcOverride ? lib.getEnvWithDefault "STATUS_GO_SRC_OVERRIDE" null,
reactMetroPort ? lib.getEnvWithDefault "RCT_METRO_PORT" 8081,
# If APKs should be split based on architectures
androidAbiSplit ? lib.getEnvWithDefault "ANDROID_ABI_SPLIT" "true",
# Android architectures to build for
@@ -159,7 +158,6 @@ in stdenv.mkDerivation rec {
--no-build-cache \
--parallel \
-Dmaven.repo.local='${deps.gradle}' \
-PreactNativeDevServerPort=${toString reactMetroPort} \
assemble${gradleBuildType}
'';
in
+1 -1
View File
@@ -6,7 +6,7 @@ if pgrep -f 'shadow-cljs watch mobile' > /dev/null; then
exit 1
fi
if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
if pgrep -f 'react-native start' > /dev/null; then
echo "Error: make run-metro is already running in another terminal" >&2
echo "Please close that terminal before running this command." >&2
exit 1
+2 -2
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
if pgrep -f 'react-native start' > /dev/null; then
echo "Info: metro is already running in another terminal"
else
echo "Info: starting a new metro terminal"
react-native start --port=${RCT_METRO_PORT:-8081} --reset-cache
react-native start --reset-cache
fi
+1 -1
View File
@@ -4,7 +4,7 @@ set -euo pipefail
TIMEOUT=10 # Metro should not take this long to start.
while [ "${TIMEOUT}" -gt 0 ]; do
if ! lsof -i:"${RCT_METRO_PORT:-8081}" &> /dev/null; then
if ! lsof -i:8081 &> /dev/null; then
echo "."
sleep 1
((TIMEOUT--))
@@ -5,7 +5,6 @@
[status-im.contexts.wallet.sheets.buy-token.view :as buy-token]
[status-im.feature-flags :as ff]
[utils.i18n :as i18n]
[utils.money :as money]
[utils.re-frame :as rf]))
(defn- action-buy
@@ -22,7 +21,6 @@
{:icon :i/send
:accessibility-label :send
:label (i18n/label :t/send)
:disabled? (:disabled? send-params)
:on-press (fn []
(rf/dispatch [:hide-bottom-sheet])
(rf/dispatch [:wallet/clean-send-data])
@@ -71,35 +69,31 @@
(defn token-value-drawer
[token watch-only? entry-point]
(let [token-symbol (:token token)
token-data (first (rf/sub [:wallet/current-viewing-account-tokens-filtered
token-symbol]))
fiat-unformatted-value (get-in token [:values :fiat-unformatted-value])
has-balance? (money/greater-than fiat-unformatted-value (money/bignumber "0"))
selected-account? (rf/sub [:wallet/current-viewing-account-address])
token-owners (rf/sub [:wallet/operable-addresses-with-token-symbol token-symbol])
send-params (if selected-account?
{:token token-data
:stack-id :screen/wallet.accounts
:disabled? (not has-balance?)
:start-flow? true
:owners token-owners}
{:token-symbol token-symbol
:stack-id :wallet-stack
:start-flow? true
:owners token-owners})
bridge-params (if selected-account?
{:token token-data
:bridge-disabled? (or (not has-balance?)
(send-utils/bridge-disabled? token-symbol))
:stack-id :screen/wallet.accounts
:start-flow? true
:owners token-owners}
{:token-symbol token-symbol
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
:stack-id :wallet-stack
:start-flow? true
:owners token-owners})]
(let [token-symbol (:token token)
token-data (first (rf/sub [:wallet/current-viewing-account-tokens-filtered
token-symbol]))
selected-account? (rf/sub [:wallet/current-viewing-account-address])
token-owners (rf/sub [:wallet/operable-addresses-with-token-symbol token-symbol])
send-params (if selected-account?
{:token token-data
:stack-id :screen/wallet.accounts
:start-flow? true
:owners token-owners}
{:token-symbol token-symbol
:stack-id :wallet-stack
:start-flow? true
:owners token-owners})
bridge-params (if selected-account?
{:token token-data
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
:stack-id :screen/wallet.accounts
:start-flow? true
:owners token-owners}
{:token-symbol token-symbol
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
:stack-id :wallet-stack
:start-flow? true
:owners token-owners})]
[quo/action-drawer
[(cond->> [(when (ff/enabled? ::ff/wallet.assets-modal-manage-tokens)
(action-manage-tokens watch-only?))
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "fix/token-cache-usage",
"commit-sha1": "c5991352264b881c6b34d261ca9c2748ea060d54",
"src-sha256": "1z3y4avg5nkl8xkhigs404g5vibk1nwpsclnh6gw1w6bzrjvnc71"
"version": "test/set-api-proxy-test",
"commit-sha1": "ca7e72ec062c9abd9b8f9eae7c96667854f69321",
"src-sha256": "1236hj7l9sj0d2gpij584lzpa2dnh5mv9d6fp0iba8sn3pb9jca3"
}
+10 -18
View File
@@ -1,13 +1,11 @@
import logging
import time
from datetime import datetime
from decimal import Decimal
from json import JSONDecodeError
from os import environ
from typing import List
import pytest
import pytz
import requests
from selenium.common import TimeoutException
@@ -40,7 +38,7 @@ class NetworkApi:
return self.send_etherscan_request(params)
def get_transactions(self, address: str) -> List[dict]:
params = {'module': 'account', 'action': 'txlist', 'address': address, 'page': 1, 'offset': 10, 'sort': 'desc'}
params = {'module': 'account', 'action': 'txlist', 'address': address, 'sort': 'desc'}
return self.send_etherscan_request(params)
def is_transaction_successful(self, transaction_hash: str) -> int:
@@ -108,28 +106,22 @@ class NetworkApi:
self.log("Failed iterate transactions(Etherscan unexpected error): " + str(e))
continue
def wait_for_confirmation_of_transaction(self, address, tx_time, confirmations=7, token=False):
expected_tx_timestamp = datetime.strptime(tx_time, "%Y-%m-%dT%H:%M:%S%z").replace(tzinfo=pytz.UTC)
def wait_for_confirmation_of_transaction(self, address, amount, confirmations=6, token=False):
start_time = time.time()
if token:
token_info = "token transaction"
else:
token_info = "ETH transaction"
self.log('Waiting for %s of %s to have %s confirmations' % (token_info, address, confirmations))
self.log('Waiting %s %s for %s to have %s confirmations' % (amount, token_info, address, confirmations))
while round(time.time() - start_time, ndigits=2) < 600: # should be < idleTimeout capability
if token:
transaction = self.get_token_transactions(address)[0]
else:
transaction = self.get_transactions(address)[0]
tx_timestamp = datetime.fromtimestamp(int(transaction['timeStamp'])).replace(tzinfo=pytz.UTC)
if tx_timestamp > expected_tx_timestamp:
if int(transaction['confirmations']) >= confirmations:
return
time.sleep(20)
transaction = self.find_transaction_by_unique_amount(address, amount, token)
self.log(
'Expected amount of confirmations is %s, in fact %s' % (confirmations, transaction['confirmations']))
pytest.fail('The last transaction was not confirmed, address is %s, still has %s confirmations' % (
address, int(transaction['confirmations'])))
if int(transaction['confirmations']) >= confirmations:
return
time.sleep(20)
pytest.fail('Transaction with amount %s was not confirmed, address is %s, still has %s confirmations' % (
amount, address, int(transaction['confirmations'])))
def verify_balance_is_updated(self, initial_balance, recipient_address, wait_time=360):
counter = 0
@@ -150,7 +142,7 @@ class NetworkApi:
balance = round(self.get_balance(address), 4)
if balance == expected_balance:
return
time.sleep(20)
time.sleep(10)
raise TimeoutException(
'balance is not updated on Etherscan, it is %s but expected to be %s' % (balance, expected_balance))
@@ -17,14 +17,13 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
self.home = self.sign_in.create_user(username=self.username)
self.home.communities_tab.click_until_presence_of_element(self.home.plus_community_button)
self.open_community_name = "open community"
self.community_name = "open community"
self.channel_name = "general"
self.community = self.home.create_community(community_type="open")
self.profile_view = self.home.get_profile_view()
self.browser_view = self.home.get_dapp_view()
self.home.get_chat(self.open_community_name, community=True).click()
self.home.get_chat(self.community_name, community=True).click()
self.community_view = self.home.get_community_view()
self.open_community_url = self.community_view.copy_community_link()
self.channel = self.community_view.get_channel(self.channel_name).click()
@marks.testrail_id(704613)
@@ -40,6 +39,7 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
self.channel.send_message(url)
self.channel.chat_element_by_text(url).click_on_link_inside_message_body()
if self.channel.profile_send_contact_request_button.is_element_displayed(10):
# username_text = self.profile_view.default_username_text.text
username_text = self.profile_view.contact_name_text.text
if not (username_text.endswith(url[-6:]) or username_text == text):
self.errors.append("Incorrect username is shown for profile url %s" % url)
@@ -47,10 +47,34 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
self.errors.append("Profile was not opened by the profile url %s" % url)
self.profile_view.close_button.click()
community_urls = {
"https://status.app/c/ixyACjgKDVNOVCBjb21tdW5pdHkSHHJlcXVpcmUgMTAgU05UIEdvZXJsaSB0byB1c2UYASIHI2VhYjcwMAM=#zQ3shUeGnhM33QW4g9JfYfeLFAH9ZwbDboNYn5exCR7S3ii1y":
"SNT community",
"https://status.app/c/G0UAAMTyNsn2QZDEG0EXftOl8pOEfwEBOOSA_YTfIk85xmADDgINGmxpUHAXzK36bN0fK42Xf4YD2yjPk1z2pbFwFw==#zQ3sheoNX5kiuM393TJ6xDnL57aQoiwFWEuJnazJ6W2eNuh9u":
"open community",
"https://status.app/c/G00AAGS9TbI9mSR-ZNmFrhRjNuEeXAAbcAIUaLLJyjMOG3ACJQ12oIHD78QhzO9s_T5bUeU7rnATWJg3mGgTUemrAg==#zQ3shp9f5M3uyMpwTi3rFpFrP6WCWmNsW9pgK9cjXVTaf2vgj":
"closed community"
}
for url, text in community_urls.items():
self.channel.just_fyi("Opening community '%s' by the url %s" % (text, url))
self.channel.chat_message_input.clear()
self.channel.send_message(url)
self.channel.chat_element_by_text(url).click_on_link_inside_message_body()
if text == 'SNT community':
if self.community_view.community_title.text != text:
self.errors.append("Community '%s' was not requested to join by the url %s" % (text, url))
else:
if not self.community_view.join_button.is_element_displayed(
10) or self.community_view.community_title.text != text:
self.errors.append("Community '%s' was not requested to join by the url %s" % (text, url))
if text != "closed community": # the last one
self.home.navigate_back_to_home_view()
self.home.get_to_community_channel_from_home(self.community_name)
self.errors.verify_no_errors()
@marks.testrail_id(702775)
def test_links_deep_links_profile(self):
def test_links_deep_links(self):
self.home.navigate_back_to_home_view()
self.home.browser_tab.click()
@@ -63,6 +87,7 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
for link, text in profile_links.items():
self.channel.just_fyi("Opening profile link %s" % link)
self.browser_view.open_url(link)
# shown_name_text = self.profile_view.default_username_text.text
shown_name_text = self.profile_view.contact_name_text.text
if text:
name_is_shown = shown_name_text == text or shown_name_text.endswith(link[-6:])
@@ -72,43 +97,25 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
self.errors.append("Profile was not opened by the profile deep link %s" % link)
self.browser_view.click_system_back_button()
self.errors.verify_no_errors()
@marks.testrail_id(739307)
def test_deep_links_communities(self):
closed_community_name, snt_community_name = "closed community", "SNT community"
self.home.navigate_back_to_home_view()
self.home.communities_tab.click()
self.home.create_community(community_type="closed")
if not self.community_view.community_options_button.is_element_displayed():
self.home.get_chat(closed_community_name, community=True).click()
closed_community_url = self.community_view.copy_community_link()
self.home.navigate_back_to_home_view()
self.home.create_community(community_type="token-gated")
if not self.community_view.community_options_button.is_element_displayed():
self.home.get_chat(snt_community_name, community=True).click()
snt_community_url = self.community_view.copy_community_link()
self.home.reopen_app(sign_in=False)
self.sign_in.create_user(username="second user", first_user=False)
self.home.browser_tab.click()
old, new = "https://status.app/", "status-app://"
community_links = {
snt_community_name: snt_community_url.replace(old, new),
self.open_community_name: self.open_community_url.replace(old, new),
closed_community_name: closed_community_url.replace(old, new)
"status.app://c/ixyACjgKDVNOVCBjb21tdW5pdHkSHHJlcXVpcmUgMTAgU05UIEdvZXJsaSB0byB1c2UYASIHI2VhYjcwMAM=#zQ3shUeGnhM33QW4g9JfYfeLFAH9ZwbDboNYn5exCR7S3ii1y":
"SNT community",
"status.app://c/G0UAAMTyNsn2QZDEG0EXftOl8pOEfwEBOOSA_YTfIk85xmADDgINGmxpUHAXzK36bN0fK42Xf4YD2yjPk1z2pbFwFw==#zQ3sheoNX5kiuM393TJ6xDnL57aQoiwFWEuJnazJ6W2eNuh9u":
"open community",
"status.app://c/G00AAGS9TbI9mSR-ZNmFrhRjNuEeXAAbcAIUaLLJyjMOG3ACJQ12oIHD78QhzO9s_T5bUeU7rnATWJg3mGgTUemrAg==#zQ3shp9f5M3uyMpwTi3rFpFrP6WCWmNsW9pgK9cjXVTaf2vgj":
"closed community"
}
for text, link in community_links.items():
for link, text in community_links.items():
self.channel.just_fyi("Opening community '%s' by the link %s" % (text, link))
self.browser_view.open_url(link)
if text == snt_community_name:
if text == 'SNT community':
if self.community_view.community_title.text != text:
self.errors.append("Community '%s' was not requested to join by the deep link %s" % (text, link))
else:
if not self.community_view.join_button.is_element_displayed(
10) or self.community_view.community_title.text != text:
self.errors.append("Community '%s' was not requested to join by the deep link %s" % (text, link))
if text != closed_community_name: # the last one
if text != "closed community": # the last one
self.home.navigate_back_to_home_view()
self.home.browser_tab.click()
+2 -8
View File
@@ -135,14 +135,11 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
self.wallet_1.just_fyi("Sending funds from wallet")
amount_to_send = 0.0001
device_time_before_sending = self.wallet_1.driver.device_time
self.wallet_1.send_asset(address='arb1:' + self.receiver['wallet_address'],
asset_name='Ether',
amount=amount_to_send)
self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
tx_time=device_time_before_sending)
device_time_after_sending = self.wallet_1.driver.device_time
device_time = self.wallet_1.driver.device_time
self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
eth_amount_receiver)
@@ -167,13 +164,10 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
self.wallet_1.just_fyi("Sending asset from drawer")
amount_to_send = 0.0001
device_time_before_sending = self.wallet_1.driver.device_time
self.wallet_1.send_asset_from_drawer(address='arb1:' + self.receiver['wallet_address'],
asset_name='Ether',
amount=amount_to_send)
self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
tx_time=device_time_before_sending)
device_time_after_sending = self.wallet_1.driver.device_time
device_time = self.wallet_1.driver.device_time
self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
eth_amount_receiver)
+6 -5
View File
@@ -372,7 +372,7 @@ class CommunityView(HomeView):
self.community_create_a_channel_button = Button(self.driver, accessibility_id="community-create-channel")
self.channel_name_edit_box = EditBox(self.driver, translation_id="name-your-channel-placeholder")
self.channel_descripton = ChatView(self.driver).community_description_edit_box
self.community_options_button = Button(self.driver, accessibility_id="community-options-for-community")
self.community_options_button = Button(self.driver, accessibility_id="community-menu-button")
self.view_members_button = Button(self.driver, accessibility_id="view-members")
self.community_info_button = Button(self.driver, translation_id="community-info")
self.invite_button = Button(self.driver, accessibility_id="community-invite-people")
@@ -455,10 +455,11 @@ class CommunityView(HomeView):
def copy_community_link(self):
self.driver.info("Copy community link")
self.community_options_button.click()
self.share_community_button.click()
text = self.sharing_text_native.text
self.click_system_back_button(times=2)
return text
self.community_info_button.click()
self.element_starts_with_text('join.status.im/c/').click()
community_link_text = self.element_starts_with_text('join.status.im/c/').text
self.home_button.double_click()
return 'https://%s' % community_link_text
def handle_membership_request(self, username: str, approve=True):
self.driver.info("Handling membership request of user '%s', approve='%s'" % (username, str(approve)))
+2 -6
View File
@@ -290,11 +290,8 @@ class ProfileView(BaseView):
self.advertise_device_button = Button(self.driver, accessibility_id="advertise-device")
self.sync_all_button = Button(self.driver, translation_id="sync-all-devices")
self.syncing_button = Button(self.driver, accessibility_id="icon, Syncing, label-component, icon")
self.paired_devices_button = Button(self.driver,
accessibility_id="icon, Paired devices, 0 devices, label-component, icon")
self.sync_plus_button = Button(
self.driver,
xpath="//*[@text='Paired devices']/following-sibling::android.view.ViewGroup[@content-desc='icon']")
self.sync_plus_button = Button(self.driver,
xpath="//*[@text='Syncing']/following-sibling::android.view.ViewGroup[1]")
# Keycard
self.keycard_button = Button(self.driver, accessibility_id="keycard-button")
@@ -542,7 +539,6 @@ class ProfileView(BaseView):
def get_sync_code(self):
self.syncing_button.scroll_and_click()
self.paired_devices_button.click()
self.sync_plus_button.click()
for checkbox in Button(
self.driver,
+3 -8
View File
@@ -260,15 +260,11 @@ class SignInView(BaseView):
# self.next_button.click()
# self.identifiers_button.wait_and_click(30)
if enable_notifications:
self.enable_notifications_button.wait_and_click()
for _ in range(3):
self.allow_button.click_if_shown(sec=10)
self.enable_notifications_button.click_if_shown()
if self.start_button.is_element_displayed():
break
self.enable_notifications_button.click_until_presence_of_element(self.start_button)
if self.allow_button.is_element_displayed():
self.allow_button.click()
else:
self.maybe_later_button.click_until_presence_of_element(self.start_button)
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
self.start_button.click()
self.chats_tab.wait_for_visibility_of_element(30)
self.driver.info("## New multiaccount is created successfully!", device=False)
@@ -297,7 +293,6 @@ class SignInView(BaseView):
self.enable_notifications_button.click_until_presence_of_element(self.start_button)
else:
self.maybe_later_button.click_until_presence_of_element(self.start_button)
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
self.start_button.click()
self.chats_tab.wait_for_visibility_of_element(30)
self.driver.info("## Multiaccount is recovered successfully!", device=False)
+2 -8
View File
@@ -1,5 +1,3 @@
import time
import pytest
from tests import common_password
@@ -122,12 +120,7 @@ class WalletView(BaseView):
self.login_button.click()
def confirm_transaction(self):
self.confirm_button.click()
for _ in range(3):
if self.slide_button_track.is_element_displayed():
break
time.sleep(1)
self.confirm_button.click()
self.confirm_button.click_until_presence_of_element(self.slide_button_track)
self.slide_and_confirm_with_password()
def set_amount(self, amount: float):
@@ -167,6 +160,7 @@ class WalletView(BaseView):
self.add_account_button.click()
self.add_account_to_watch.click()
self.address_to_watch_input.send_keys(address)
self.account_has_activity_label.wait_for_visibility_of_element()
self.add_account_continue_button.click()
SignInView(self.driver).profile_title_input.send_keys(account_name)
self.add_watched_address_button.click()