Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
4c925e5
Add more IPC message types for protocol handler
ebma Jun 2, 2020
c9453e9
Implement protocol handler ipc for electron
ebma Jun 2, 2020
fa630c9
Add helper functions for protocol handler state
ebma Jun 2, 2020
b50c6c0
Add ProtocolHandlerPermission component
ebma Jun 2, 2020
6f75fba
Show ProtocolHandlerPermission on desktop
ebma Jun 2, 2020
272a571
Add app settings item for protocol handler
ebma Jun 2, 2020
7c19144
Implement protocol handler ipc for web
ebma Jun 2, 2020
1fbceda
Replace hardcoded strings
ebma Jun 2, 2020
0d9082d
Disable installation as protocol client
ebma Jun 8, 2020
f7cae4e
Hide protocol handler setting with env var flag
ebma Jun 8, 2020
3ce61a1
Add '@stellarguard/stellar-uri' dependency
ebma Nov 23, 2020
9dd12c4
Save settings to localStorage in web build
ebma Nov 23, 2020
1116cbb
Add transactionRequest context
ebma Nov 25, 2020
9e31652
Add TransactionRequestHandler
ebma Nov 25, 2020
3d83dc0
Add VerifyTrustedServiceDialog
ebma Nov 25, 2020
fac8b02
Add PaymentAccountSelectionDialog
ebma Nov 25, 2020
09c84b1
Add transaction-request.json to i18n translations
ebma Nov 25, 2020
fcd49b7
Support filling in payment form from search params
ebma Nov 30, 2020
daf8479
Go to payment form on payment account selection
ebma Nov 30, 2020
776cffb
Only show accounts which have trustline for asset
ebma Nov 30, 2020
c262505
Add proper backnavigation from payment dialog
ebma Dec 2, 2020
c5a0579
Enable trusted services by default
ebma Dec 2, 2020
714943d
Disable form fields if preselected params exist
ebma Dec 2, 2020
66bf4e5
Show error when no account is selectable
ebma Dec 2, 2020
77d5a45
Remove colons and change warning text
ebma Dec 2, 2020
ebf347e
Some small-ish UI changes affecting the tx request review dialog
andywer Dec 3, 2020
1adf3f2
Change wording of warning message
ebma Dec 7, 2020
b106196
Show dismiss button if onCancel prop present
ebma Jan 20, 2021
90f3e3c
Add 'selectedAccount' prop to AccountSelectionList
ebma Jan 20, 2021
2c107d0
Add NoAccountsDialog
ebma Jan 20, 2021
d6dff65
Move components
ebma Jan 20, 2021
f6b3c67
Refactor PaymentAccountSelectionDialog
ebma Jan 20, 2021
abc70ab
Change key of i18n strings
ebma Jan 20, 2021
fe1abca
Create TransactionRequestReviewDialog
ebma Jan 18, 2021
d6ad31d
Add `fullWidth` prop to TransactionSummary
ebma Jan 18, 2021
af9d4bd
Rename PaymentAccountSelectionDialog
ebma Jan 18, 2021
a2b9807
Rename TransactionRequestHandler
ebma Jan 18, 2021
8659c3b
Check transaction during uri verification
ebma Jan 18, 2021
fe3dfad
Add padding around AccountSelectionList
ebma Jan 18, 2021
fa184a6
Refactor selectable accounts
ebma Jan 18, 2021
34f47e1
Remove selectable accounts check
ebma Jan 20, 2021
33d5fbd
Show info dialog if no accounts are imported
ebma Jan 20, 2021
05eb8c2
Replace hard-coded strings
ebma Jan 25, 2021
fd0efc5
Remove whitespace of NoAccountsDialog
ebma Jan 25, 2021
dd38189
Create unified StellarRequestReviewDialog
ebma Jan 25, 2021
d362dbd
Rename i18n keys
ebma Jan 25, 2021
1360e88
Remove paymentParams prop from PaymentDialog
ebma Jan 25, 2021
16a9d2b
Show message on submission error
ebma Jan 25, 2021
ee2e333
Merge remote-tracking branch 'upstream/feature/support-sep7-requests'…
troggy Oct 24, 2024
f93d217
brand: Solar → Sunce
troggy Oct 24, 2024
452afb8
enable protocol handler for electron
troggy Oct 24, 2024
ad8dfa1
add some missing translations.
troggy Oct 24, 2024
e4d3f49
Merge remote-tracking branch 'upstream/feature/957-ask-user-before-in…
troggy Oct 24, 2024
48b3a5a
enable SEP-7 registration for electron app
troggy Oct 24, 2024
5c1d880
register web+stellar handler on menu item click for web app
troggy Oct 24, 2024
db5efb1
show uri handler permission for all the platforms except mobiles
troggy Oct 24, 2024
152b63d
bump version 1.1.0
sozidatel Nov 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions electron/src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ app.name = "Sunce Wallet"

// Needs to match the value in electron-build.yml
app.setAppUserModelId("org.montelibero.sunce")

// Disabled until we actually ship SEP-7 support
// app.setAsDefaultProtocolClient("web+stellar")
15 changes: 15 additions & 0 deletions electron/src/protocol-handler.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
import { app } from "electron"
import events from "events"
import { createMainWindow, getOpenWindows, trackWindow } from "./window"
import { expose } from "./ipc/_ipc"
import { Messages } from "./shared/ipc"

const urlEventEmitter = new events.EventEmitter()
const urlEventChannel = "deeplink:url"

let urlEventQueue: string[] = []
let isWindowReady = false

expose(Messages.IsDefaultProtocolClient, () => {
return app.isDefaultProtocolClient("web+stellar")
})

expose(Messages.IsDifferentHandlerInstalled, () => {
const name = app.getApplicationNameForProtocol("web+stellar://") // '://' is needed here
return Boolean(name)
})

expose(Messages.SetAsDefaultProtocolClient, () => {
return app.setAsDefaultProtocolClient("web+stellar")
})

export function subscribe(subscribeCallback: (...args: any[]) => void) {
urlEventEmitter.on(urlEventChannel, subscribeCallback)
const unsubscribe = () => urlEventEmitter.removeListener(urlEventChannel, subscribeCallback)
Expand Down
2 changes: 2 additions & 0 deletions i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Generic from "./locales/en/generic.json"
import Operations from "./locales/en/operations.json"
import Payment from "./locales/en/payment.json"
import Trading from "./locales/en/trading.json"
import TransactionRequest from "./locales/en/transaction-request.json"
import TransferService from "./locales/en/transfer-service.json"

const translations = {
Expand All @@ -19,6 +20,7 @@ const translations = {
operations: Operations,
payment: Payment,
trading: Trading,
"transaction-request": TransactionRequest,
"transfer-service": TransferService
} as const

Expand Down
2 changes: 2 additions & 0 deletions i18n/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Generic from "./locales/es/generic.json"
import Operations from "./locales/es/operations.json"
import Payment from "./locales/es/payment.json"
import Trading from "./locales/es/trading.json"
import TransactionRequest from "./locales/es/transaction-request.json"
import TransferService from "./locales/es/transfer-service.json"

const translations = {
Expand All @@ -19,6 +20,7 @@ const translations = {
operations: Operations,
payment: Payment,
trading: Trading,
"transaction-request": TransactionRequest,
"transfer-service": TransferService
} as const

Expand Down
2 changes: 2 additions & 0 deletions i18n/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Generic from "./locales/it/generic.json"
import Operations from "./locales/it/operations.json"
import Payment from "./locales/it/payment.json"
import Trading from "./locales/it/trading.json"
import TransactionRequest from "./locales/it/transaction-request.json"
import TransferService from "./locales/it/transfer-service.json"

const translations = {
Expand All @@ -19,6 +20,7 @@ const translations = {
operations: Operations,
payment: Payment,
trading: Trading,
"transaction-request": TransactionRequest,
"transfer-service": TransferService
} as const

Expand Down
9 changes: 9 additions & 0 deletions i18n/locales/en/app-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
}
}
},
"protocol-handler": {
"text": {
"primary": "Handle Stellar protocol requests",
"secondary": {
"default": "Solar is handling all Stellar links",
"non-default": "Make Solar handle all Stellar URIs"
}
}
},
"testnet": {
"text": {
"primary": "Show Testnet Accounts",
Expand Down
9 changes: 9 additions & 0 deletions i18n/locales/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
"text": "Sunce Wallet will now show notifications"
},
"message": "Enable app notifications"
},
"protocol-handler": {
"error": "Could not register Solar as default handler.",
"message": "Do you want Solar to handle interactive Stellar links on this computer (recommended)?",
"success": "Successfully registered Solar as default handler.",
"tooltip": {
"dismiss": "Dismiss",
"install": "Install"
}
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/en/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@
"request-failed-error": "Request to {{target}} failed with status {{status}}: {{message}}",
"stellar-address-not-found-error": "Stellar address not found: {{address}}",
"stellar-address-request-failed-error": "Stellar address resolution of {{address}} failed.",
"stellar-uri-verification-error": "Stellar URI's signature could not be verified.",
"submission-failed-error": "Submitting transaction to {{endpoint}} failed with status {{status}}: {{message}}",
"testnet-endpoint-not-available-error": "{{service}} does not provide a testnet endpoint.",
"timeout-error": "Request timed out",
"unexpected-action-error": "Unexpected action: {{action}}",
"unexpected-state-error": "Encountered unexpected state: {{state}}",
"unexpected-response-type-error": "Unexpected response type: {{type}} / ${dataType}",
"unexpected-stellar-uri-type-error": "Incoming uri {{incomingURI}} does not match any expected type.",
"unknown-error": "An unknown error occured.",
"update-already-running-error": "Update is already running!",
"wrong-password-error": "Wrong password.",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/en/payment.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"actions": {
"dismiss": "Dismiss",
"submit": "Send now"
},
"memo-metadata": {
Expand Down
64 changes: 64 additions & 0 deletions i18n/locales/en/transaction-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"no-accounts": {
"action": {
"dismiss": "Dismiss"
},
"info": {
"1": "No accounts found for the specified network.",
"2": "You must import an account before you can sign transaction requests."
},
"title": "Transaction proposed"
},
"payment": {
"account-selector": "Select the account to use",
"action": {
"dismiss": "Dismiss",
"select": "Select"
},
"error": {
"no-activated-accounts": "No activated accounts found.",
"no-accounts-with-trustline": "No accounts with matching trustline found."
},
"uri-content": {
"message": "Message"
}
},
"transaction": {
"account-selector": {
"source-account": "Select the source account",
"signing-account": "Select the account that will sign the transaction"
},
"action": {
"dismiss": "Dismiss",
"select": "Select"
},
"error": {
"signer-not-imported": "The transaction request specified '{{signer}}' as the target signer but this account is not imported.",
"no-eligible-accounts": "No eligible account found."
},
"hint": "Hint",
"uri-content": {
"message": "Message"
},
"warning": "The origin of this request cannot be verified! Decline when in doubt."
},
"stellar-uri": {
"header": {
"origin-domain": "The following transaction has been proposed by <1>{{originDomain}}<3>",
"warning": "The origin of this request cannot be verified! Decline when in doubt."
},
"title": "Transaction proposed"
},
"verify-trusted-service": {
"action": {
"trust": "Trust",
"cancel": "Cancel"
},
"info": {
"1": "You opened a Stellar URI originating from an unknown origin",
"2": "If you trust this domain you can add this service to your list of trusted services.",
"3": "You can view and edit your list of trusted services anytime in the application settings."
},
"title": "Verify Trusted Service"
}
}
4 changes: 3 additions & 1 deletion i18n/locales/es/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@
"request-failed-error": "Solicitud a {{target}} ha fallado con estado {{status}}: {{message}}",
"stellar-address-not-found-error": "Dirección Stellar no encontrada: {{address}}",
"stellar-address-request-failed-error": "Falló la resolución de la dirección Stellar {{address}}",
"stellar-uri-verification-error": "No se ha podido verificar la firma de Stellar URI",
"submission-failed-error": "Envío de transacción a {{endpoint}} falló con estado {{status}}: {{message}}",
"testnet-endpoint-not-available-error": "{{service}} no provee un punto de conexión Testnet.",
"timeout-error": "Solicitud ha caducado",
"unexpected-action-error": "Acción imprevista: {{action}}",
"unexpected-state-error": "Se encontró un estado inesperado: {{state}}",
"unexpected-response-type-error": "Tipo de respuesta imprevista: {{type}} / ${dataType}",
"unexpected-stellar-uri-type-error": "La uri entrante {{incomingURI}} no coincide con ningún tipo esperado.",
"unknown-error": "Ocurrió un error desconocido.",
"update-already-running-error": "¡La actualización ya se está ejecutando!",
"wrong-password-error": "Contraseña equivocada.",
Expand Down Expand Up @@ -96,4 +98,4 @@
"user-interface": {
"copied-to-clipboard": "Copiado a Portapapeles."
}
}
}
1 change: 1 addition & 0 deletions i18n/locales/es/payment.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"actions": {
"dismiss": "Desechar",
"submit": "Enviar ahora"
},
"memo-metadata": {
Expand Down
64 changes: 64 additions & 0 deletions i18n/locales/es/transaction-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"no-accounts": {
"action": {
"dismiss": "Dismiss"
},
"info": {
"1": "No accounts found for the specified network.",
"2": "You must import an account before you can sign transaction requests."
},
"title": "Transaction proposed"
},
"payment": {
"account-selector": "Select the account to use",
"action": {
"dismiss": "Dismiss",
"select": "Select"
},
"error": {
"no-activated-accounts": "No activated accounts found.",
"no-accounts-with-trustline": "No accounts with matching trustline found."
},
"uri-content": {
"message": "Message"
}
},
"transaction": {
"account-selector": {
"source-account": "Select the source account",
"signing-account": "Select the account that will sign the transaction"
},
"action": {
"dismiss": "Dismiss",
"select": "Select"
},
"error": {
"signer-not-imported": "The transaction request specified '{{signer}}' as the target signer but this account is not imported.",
"no-eligible-accounts": "No eligible account found."
},
"hint": "Hint",
"uri-content": {
"message": "Message"
},
"warning": "The origin of this request cannot be verified! Decline when in doubt."
},
"stellar-uri": {
"header": {
"origin-domain": "The following transaction has been proposed by <1>{{originDomain}}<3>",
"warning": "The origin of this request cannot be verified! Decline when in doubt."
},
"title": "Transaction proposed"
},
"verify-trusted-service": {
"action": {
"trust": "Trust",
"cancel": "Cancel"
},
"info": {
"1": "You opened a Stellar URI originating from an unknown origin",
"2": "If you trust this domain you can add this service to your list of trusted services.",
"3": "You can view and edit your list of trusted services anytime in the application settings."
},
"title": "Verify Trusted Service"
}
}
2 changes: 2 additions & 0 deletions i18n/locales/it/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
"request-failed-error": "Richiesta a {{target}} fallita {{status}}: {{message}}",
"stellar-address-not-found-error": "Indirizzo stellare non trovato: {{address}}",
"stellar-address-request-failed-error": "Risoluzione stellare dell'indirizzo di {{address}} non riuscita.",
"stellar-uri-verification-error": "Non è stato possibile verificare la firma di Stellar URI.",
"submission-failed-error": "Invio della transazione a {{endpoint}} fallita {{status}}: {{message}}",
"testnet-endpoint-not-available-error": "{{service}} non fornisce un endpoint testnet.",
"timeout-error": "Richiesta scaduta",
"unexpected-action-error": "Azione imprevista: {{action}}",
"unexpected-state-error": "Stato imprevisto riscontrato: {{state}}",
"unexpected-response-type-error": "Tipo di risposta imprevista: {{type}} / ${dataType}",
"unexpected-stellar-uri-type-error": "L'uri in arrivo {{incomingURI}} non corrisponde a nessun tipo previsto.",
"unknown-error": "Si è verificato un errore sconosciuto.",
"update-already-running-error": "L'aggiornamento è già in esecuzione!",
"wrong-password-error": "Password errata.",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/it/payment.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"actions": {
"dismiss": "Respingi",
"submit": "Spedisci ora"
},
"memo-metadata": {
Expand Down
64 changes: 64 additions & 0 deletions i18n/locales/it/transaction-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"no-accounts": {
"action": {
"dismiss": "Dismiss"
},
"info": {
"1": "No accounts found for the specified network.",
"2": "You must import an account before you can sign transaction requests."
},
"title": "Transaction proposed"
},
"payment": {
"account-selector": "Select the account to use",
"action": {
"dismiss": "Dismiss",
"select": "Select"
},
"error": {
"no-activated-accounts": "No activated accounts found.",
"no-accounts-with-trustline": "No accounts with matching trustline found."
},
"uri-content": {
"message": "Message"
}
},
"transaction": {
"account-selector": {
"source-account": "Select the source account",
"signing-account": "Select the account that will sign the transaction"
},
"action": {
"dismiss": "Dismiss",
"select": "Select"
},
"error": {
"signer-not-imported": "The transaction request specified '{{signer}}' as the target signer but this account is not imported.",
"no-eligible-accounts": "No eligible account found."
},
"hint": "Hint",
"uri-content": {
"message": "Message"
},
"warning": "The origin of this request cannot be verified! Decline when in doubt."
},
"stellar-uri": {
"header": {
"origin-domain": "The following transaction has been proposed by <1>{{originDomain}}<3>",
"warning": "The origin of this request cannot be verified! Decline when in doubt."
},
"title": "Transaction proposed"
},
"verify-trusted-service": {
"action": {
"trust": "Trust",
"cancel": "Cancel"
},
"info": {
"1": "You opened a Stellar URI originating from an unknown origin",
"2": "If you trust this domain you can add this service to your list of trusted services.",
"3": "You can view and edit your list of trusted services anytime in the application settings."
},
"title": "Verify Trusted Service"
}
}
2 changes: 2 additions & 0 deletions i18n/locales/ru/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@
"request-failed-error": "Запрос к {{target}} завершился с ошибкой статуса {{status}}: {{message}}",
"stellar-address-not-found-error": "Адрес Stellar не найден: {{address}}",
"stellar-address-request-failed-error": "Не удалось найти адрес Stellar {{address}}.",
"stellar-uri-verification-error": "Не удалось верифицировать Stellar URI.",
"submission-failed-error": "Не удалось отправить транзакцию на {{endpoint}} с ошибкой статуса {{status}}: {{message}}",
"testnet-endpoint-not-available-error": "{{service}} не предоставляет конечную точку тестовой сети.",
"timeout-error": "Время запроса истекло",
"unexpected-action-error": "Неожиданное действие: {{action}}",
"unexpected-state-error": "Обнаружено неожиданное состояние: {{state}}",
"unexpected-response-type-error": "Неожиданный тип ответа: {{type}} / ${dataType}",
"unexpected-stellar-uri-type-error": "Запрос {{incomingURI}} не поддерживается",
"unknown-error": "Произошла неизвестная ошибка.",
"update-already-running-error": "Обновление уже запущено!",
"wrong-password-error": "Неверный пароль.",
Expand Down
Loading