diff --git a/src/lib/amber.ts b/src/lib/amber.ts index 1648b9c..2691c96 100644 --- a/src/lib/amber.ts +++ b/src/lib/amber.ts @@ -290,18 +290,14 @@ function buildCallbackUrl(): string { /** * Navigate to an Amber nostrsigner: URL. - * In Capacitor WebViews, window.location.href causes a "malformed request" - * error because the WebView tries to navigate instead of firing an intent. - * Use window.open() with _system target to hand off to Android properly. + * + * Use window.location.href for all platforms — Android handles the + * nostrsigner: custom scheme via intent-filter regardless of whether + * we're in a WebView or browser. window.open(_system) was stripping + * query parameters causing Amber to receive a malformed request. */ function openAmberUrl(url: string): void { - // Capacitor / Android WebView: use _system to fire the intent - const isCapacitor = !!(window as unknown as { Capacitor?: { isNativePlatform?: () => boolean } }).Capacitor?.isNativePlatform?.(); - if (isCapacitor) { - window.open(url, '_system'); - } else { - window.location.href = url; - } + window.location.href = url; } /**