safe-global / safe-apps-sdk

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

Feat extended safe info #580

Closed compojoom closed 5 months ago

compojoom commented 5 months ago

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 5 months ago

🦋 Changeset detected

Latest commit: 60e8ed191403e7857d6803db6d02f6687a7d53a4

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

github-actions[bot] commented 5 months ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

compojoom commented 5 months ago

I have read the CLA Document and I hereby sign the CLA