safe-global / safe-ios

Safe Multisig iOS app.
GNU General Public License v3.0
114 stars 37 forks source link

Maintenance: update "relay" routes #3395

Closed DmitryBespalov closed 5 months ago

DmitryBespalov commented 6 months ago

Data for the new relay endpoints: safe address, safe version

Affected requests:

POST /v1/relay/:chainId → /v1/chains/:chainId/relay

GET /v1/relay/:chainId/:safeAddress → /v1/chains/:chainId/relay/:safeAddress

Updated data structures for the POST request:

type Request = {
  to: string;
  data: string;
  gasLimit?: string;
    // ⚠️ New
  version?: string; // Defaults to "1.3.0"
}

Contact person: Frederico Sabino or Aaron Cook

iamacook commented 6 months ago

It would be preferable to always specify the version so that we can eventually remove the default.

DmitryBespalov commented 6 months ago

Alright, here's a list of things to keep in mind to make it work on mobile:

thanks @schmanu and @liliya-soroka adjusting config and spotting where the issue might be.

iamacook commented 6 months ago
* Sending any token or native coin to self is returning misleading error message in the API: https://github.com/safe-global/safe-client-gateway/blob/0a81757cd61b2ef6ba9b5fb615cb5a1f75c89ee3/src/domain/relay/limit-addresses.mapper.spec.ts#L346 and here https://github.com/safe-global/safe-client-gateway/blob/0a81757cd61b2ef6ba9b5fb615cb5a1f75c89ee3/src/domain/relay/limit-addresses.mapper.spec.ts#L371

Thank you for the feedback. We will look into updating the error message.

Edit: this has been changed.

liliya-soroka commented 5 months ago

Verified