safe-global / safe-apps-sdk

Client-side SDKs to create third-party Safe Apps
https://safe.global
MIT License
250 stars 116 forks source link

Feat extended safe info #591

Closed dasanra closed 3 months ago

dasanra commented 3 months ago

Created from #580


While working on this cowswap PR: https://github.com/cowprotocol/cowswap/pull/4508 I discovered that the inconsistency in the responses of the sdk's getInfo and api-kit's getSafeInfo makes my life miserable.

I'm proposing to change the return type of the getInfo endpoint and align it a bit more to the SafeInfoResponse: https://github.com/safe-global/safe-core-sdk/blob/8896940929eb23b154e0e6615226f1f7c004c7fb/packages/api-kit/src/types/safeTransactionServiceTypes.ts#L34

  readonly address: string
  readonly nonce: number
  readonly threshold: number
  readonly owners: string[]
  readonly singleton: string
  readonly modules: string[]
  readonly fallbackHandler: string
  readonly guard: string
  readonly version: string

Basically the only additional info to that is the chainId and isReadOnly flag.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 5d228c47d60cf6b02c5716be3da91e05a8dc2a2a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | -------------------------------- | ----- | | @safe-global/safe-apps-sdk | Minor | | @safe-global/safe-apps-web3modal | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR