diff --git a/CLAUDE.md b/CLAUDE.md index 65d310df0..632672f2e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -157,7 +157,7 @@ Each Layer2 follows a specific pattern: **Bitcoin (UTXO-based)** - Uses `WatchOnlyWallet` wrapping `HDSegwitBech32Wallet` - BIP84 derivation: `m/84'/0'/{account}'` -- Electrum server (electrum.layerzwallet.com) for balance/tx/UTXO queries +- Electrum server (electrum2.layerzwallet.com:50005) for balance/tx/UTXO queries - Gap limit of 20 for address discovery **EVM Chains (Rootstock, Botanix, Citrea, Alpen)** diff --git a/mobile/.maestro/subflows/input-spark-address.yml b/mobile/.maestro/subflows/input-spark-address.yml index b441a6b7c..e729415d5 100644 --- a/mobile/.maestro/subflows/input-spark-address.yml +++ b/mobile/.maestro/subflows/input-spark-address.yml @@ -5,6 +5,15 @@ appId: com.layerzwallet.mobile - tapOn: id: 'send-address-input' - waitForAnimationToEnd +# Extra wait so the iOS soft keyboard has time to fully present before the first +# eraseText/inputText. Maestro's `Keyboard (First Match)` probe hard-fails after 92s +# when the keyboard isn't up yet; the default ~300ms waitForAnimationToEnd is not +# always enough on CI simulators (especially when the simulator is in a state where +# the hardware keyboard suppresses the soft keyboard on first focus). +- runFlow: + file: sleep.yml + env: + TIMEOUT: 1500 - eraseText: 1 - inputText: 'spark1pgssyjcyyyp' - runFlow: @@ -27,3 +36,16 @@ appId: com.layerzwallet.mobile env: TIMEOUT: 1000 - assertNotVisible: 'Invalid address' +# Dismiss the soft keyboard so the bottom Next button is reachable. +# (Without this the IME covers send-address-next-button on Android, and on iOS the +# button sits below the keyboard since send-address.tsx no longer uses KeyboardAvoidingView.) +# We tap an empty area instead of `hideKeyboard` because that command hard-fails on +# iOS when the keyboard has no inputAccessoryView/Done button, even after the keyboard +# successfully dismisses. Mirrors the convention in swap.yml of tapping a non-input area. +# y=22% lands in the padding between the address card (ends ~y=24% of screen) and the +# Tokens section header (starts ~y=32%). Critically, this point is *above* any soft +# keyboard on both iOS (top ~y=65%) and Android (top ~y=55%), so the tap can't accidentally +# land on a keyboard key like 50%,50% would on Android. +- tapOn: + point: '50%,22%' +- waitForAnimationToEnd diff --git a/mobile/app/send/send-address.tsx b/mobile/app/send/send-address.tsx index c496ba5c8..238bfb9f3 100644 --- a/mobile/app/send/send-address.tsx +++ b/mobile/app/send/send-address.tsx @@ -2,7 +2,7 @@ import { Ionicons } from '@expo/vector-icons'; import * as bip21 from 'bip21'; import { Stack, useRouter } from 'expo-router'; import React, { useCallback, useContext, useRef, useState } from 'react'; -import { KeyboardAvoidingView, Platform, StyleSheet, TextInput, View } from 'react-native'; +import { StyleSheet, TextInput, View } from 'react-native'; import Pressable from '../../components/Pressable'; import RadialGradientScreen from '@/components/RadialGradientScreen'; @@ -91,51 +91,46 @@ const SendAddress: React.FC = () => { - - - - - - To - - - - - - - - {errorMessage && ( - - - {errorMessage} - - )} + + + + + To + + + + + - - - - Next - + {errorMessage && ( + + + {errorMessage} + + )} - + + + + + Next + + ); }; const styles = StyleSheet.create({ - keyboardAvoidingView: { - flex: 1, - }, container: { flex: 1, paddingHorizontal: 16, diff --git a/shared/blue_modules/BlueElectrum.ts b/shared/blue_modules/BlueElectrum.ts index 93cf4532e..d20a99111 100644 --- a/shared/blue_modules/BlueElectrum.ts +++ b/shared/blue_modules/BlueElectrum.ts @@ -72,7 +72,7 @@ type Peer = { path?: string; }; -export const hardcodedPeers: Peer[] = [{ host: 'electrum.layerzwallet.com', port: 50004 }]; +export const hardcodedPeers: Peer[] = [{ host: 'electrum2.layerzwallet.com', port: 50005 }]; let mainClient: WsElectrumClient; export let mainConnected: boolean = false; diff --git a/shared/tests/integration-vi/blue-electrum.test.ts b/shared/tests/integration-vi/blue-electrum.test.ts index 39799a8b8..9b5f9499a 100644 --- a/shared/tests/integration-vi/blue-electrum.test.ts +++ b/shared/tests/integration-vi/blue-electrum.test.ts @@ -18,7 +18,7 @@ beforeAll(async () => { }); test.skip('can do websocket electrum request', async () => { - const socket = new WebSocket('wss://electrum.layerzwallet.com:50004'); + const socket = new WebSocket('wss://electrum2.layerzwallet.com:50005'); let gotMessage = false; socket.addEventListener('open', (event) => { @@ -118,7 +118,7 @@ describe('BlueElectrum', () => { assert.ok(!(await BlueElectrum.testConnection('joyreactor.cc', 443))); assert.ok(!(await BlueElectrum.testConnection('joyreactor.cc', 80))); - assert.ok(await BlueElectrum.testConnection('electrum.layerzwallet.com', 50004)); + assert.ok(await BlueElectrum.testConnection('electrum2.layerzwallet.com', 50005)); }); it('ElectrumClient can estimate fees', async () => {