broxus / ever-wallet-api

Self-hosted wallet management service
Apache License 2.0
22 stars 20 forks source link

Not generated by the service (external) address leads to server error #13

Closed evd0kim closed 3 weeks ago

evd0kim commented 10 months ago

Log output.

Dec 13 21:20:44 evernode ton-wallet-api[548446]: INFO ton_wallet_api::api = started GET /ton/v3/address/0:82d6884271fab6516973024db8247c807f56085c99526d965d4bae695885f969
Dec 13 21:20:44 evernode ton-wallet-api[548446]: INFO sqlx::query = SELECT id, service_id as …; rows affected: 0, rows returned: 0, elapsed: 373.698µs
Dec 13 21:20:44 evernode ton-wallet-api[548446]: SELECT
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   id,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   service_id as "service_id: _",
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   workchain_id,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   hex,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   base64url,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   public_key,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   private_key,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   account_type as "account_type: _",
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   custodians,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   confirmations,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   custodians_public_keys,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   balance,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   created_at,
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   updated_at
Dec 13 21:20:44 evernode ton-wallet-api[548446]: FROM
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   address
Dec 13 21:20:44 evernode ton-wallet-api[548446]: WHERE
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   service_id = $1
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   AND workchain_id = $2
Dec 13 21:20:44 evernode ton-wallet-api[548446]:   AND hex = $3
Dec 13 21:20:44 evernode ton-wallet-api[548446]:  
Dec 13 21:20:44 evernode ton-wallet-api[548446]: ERROR ton_wallet_api::api::error = Generic error: no rows returned by a query that expected to return at least one row
evd0kim commented 3 weeks ago

Found an explanation in the source code citing security reasons.

https://github.com/broxus/ever-wallet-api/blob/5368e28bb2e06ac59bde096190976551770b384d/src/api/error.rs#L58