Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking*: Request Routing for Safe App #89

Merged
merged 6 commits into from
Oct 28, 2024
Merged

Breaking*: Request Routing for Safe App #89

merged 6 commits into from
Oct 28, 2024

Conversation

bh2smith
Copy link
Collaborator

@bh2smith bh2smith commented Oct 26, 2024

Change Summary

To be included in release notes:

Major:

  • Streamlines transaction decoding (for UI).
    • Adding support for TransactionSerializable & TypedData
    • previously was only UserOperation and Raw Messages
  • decodeTxData is no longer a class method on NearSafe, but rather standalone:
    • Decoupling the Adapter from transaction decoding.
  • NearSafe.requestRouter now offers fallback support for MPC/EOA Addresses:
    • This is primarily for WalletConnect.
    • Utilizes the "from" field in SignRequestData.params: EthTxParams to determine which account should sign.
  • hash has been replaced with hashToSign in EncodedSignRequest.
    • Note that this is a userOpHash whenever the evmMessage is a UserOperation

Minor:

  • Introduces clever type guard for TransactionSerializable
  • new Utility Function NearSafe.encodeForSafe returning boolean.
  • Replace EvmTransactionData with SafeEncodedSignRequest which naturally extends EncodedSignRequest from near-ca.

⚠️ This will introduce breaking changes!

src/near-safe.ts Outdated Show resolved Hide resolved
@bh2smith bh2smith changed the title WIP: Request Routing for Safe App Breaking*: Request Routing for Safe App Oct 26, 2024
@bh2smith bh2smith marked this pull request as ready for review October 28, 2024 09:53
@bh2smith bh2smith merged commit 82bd888 into main Oct 28, 2024
1 check passed
@bh2smith bh2smith deleted the wc/safe-app branch October 28, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant