Skip to content

Commit

Permalink
fixed grammer
Browse files Browse the repository at this point in the history
  • Loading branch information
vrajdesai78 committed Jan 3, 2025
1 parent 238eea9 commit ac470ca
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions docs/walletkit/android/experimental/chain-abstraction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Apps need to pass `gas` as null, while sending a transaction to allow proper gas
:::

When sending a transaction, you need to:
1. Check if the required chain has enough funds to complete the transaction or not
1. Check if the required chain has enough funds to complete the transaction
2. If not, use the `prepare` method to generate necessary bridging transactions
3. Check the status of the bridging transactions and wait for them to be completed
4. Once the bridging transactions are completed, execute the initial transaction
Expand All @@ -22,10 +22,10 @@ The following sequence diagram illustrates the complete flow of a chain abstract

## Methods

Following are the methods from WalletKit that you will use in implementing chain abstraction.
The following methods from WalletKit are used in implementing chain abstraction.

:::note
Chain abstraction is currently in experimental phase and requires the `@ChainAbstractionExperimentalApi` annotation.
Chain abstraction is currently in an experimental phase and requires the `@ChainAbstractionExperimentalApi` annotation.
:::

### Prepare
Expand Down Expand Up @@ -91,11 +91,11 @@ fun getTransactionsDetails(

### Usage

When your wallet receives an `eth_sendTransaction` request, first check if chain abstraction is needed using the `prepare` method, if it is, you need to sign all the fulfilment transactions and broadcast them in parallel.
When sending a transaction, first check if chain abstraction is needed using the `prepare` method. If it is needed, you must sign all the fulfillment transactions and broadcast them in parallel.
After that, you need to call the `status` method to check the status of the fulfillment operation.

If the operation is successful, you need to broadcast the initial transaction and await for the transaction hash and receipt.
If the operation is not successful, you need to send the JsonRpcError to the dapp and display the error to the user.
If the operation is successful, broadcast the initial transaction and await the transaction hash and receipt.
If the operation is unsuccessful, send the JsonRpcError to the dapp and display the error to the user.

```kotlin
val initialTransaction = Wallet.Model.Transaction(...)
Expand Down
2 changes: 1 addition & 1 deletion docs/walletkit/features/experimental/chain-abstraction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ Currently, Chain Abstraction supports USDC but we are working on adding support

### What are the limitations?

We currently support 1:1 transfers i.e. sourcing funds from one address to another. Make sure that your transfering minimum 0.55 USDC and have enough gas to pay bridging fees.
We currently support 1:1 transfers i.e. sourcing funds from one address to another. Make sure that you're transferring minimum 0.55 USDC and have enough gas to pay bridging fees.
16 changes: 8 additions & 8 deletions docs/walletkit/ios/experimental/chain-abstraction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Apps need to pass `gas` as null, while sending a transaction to allow proper gas
:::

When sending a transaction, you need to:
1. Check if the required chain has enough funds to complete the transaction or not
1. Check if the required chain has enough funds to complete the transaction
2. If not, use the `prepare` method to generate necessary bridging transactions
3. Check the status of the bridging transactions and wait for them to be completed
4. Once the bridging transactions are completed, execute the initial transaction
Expand All @@ -25,7 +25,7 @@ The following sequence diagram illustrates the complete flow of a chain abstract
Following are the methods from WalletKit that you will use in implementing chain abstraction.

:::note
💡 Chain abstraction is currently in experimental phase
💡 Chain abstraction is currently in the experimental phase
:::

### Prepare
Expand All @@ -41,7 +41,7 @@ public func prepare(transaction: InitialTransaction) async throws -> PrepareResp

### Wait For Success With Timeout

This method is used to wait for the all transactions to complete successfully. It will return a response with the transaction hash and receipt if the operation completed successfully.
This method is used to wait for all transactions to complete successfully. It will return a response with the transaction hash and receipt if the operation completed successfully.
If the operation did not complete successfully, it will throw an error.

```swift
Expand Down Expand Up @@ -72,11 +72,11 @@ public func getUIFields(chainId: String) async throws -> UIFields {

## Usage

When your wallet receives an `eth_sendTransaction` request, first check if chain abstraction is needed using the `prepare` method, if it is, you need to sign all the fulfilment transactions and broadcast them in parallel.
After that, you need to call the `waitForSuccessWithTimeout ` method to check the status of the fulfillment operation.
When sending a transaction, first check if chain abstraction is needed using the `prepare` method. If it is needed, you need to sign all the fulfillment transactions and broadcast them in parallel.
After that, you need to call the `waitForSuccessWithTimeout` method to check the status of the fulfillment operation.

If the operation is successful, you need to broadcast the initial transaction and await for the transaction hash and receipt.
If the operation is not successful, you need to send the JsonRpcError to the dapp and display the error to the user.
If the operation is successful, you need to broadcast the initial transaction and await the transaction hash and receipt.
If the operation is not successful, you need to send a JsonRpcError to the dapp and display the error to the user.

```swift
guard request.method == "eth_sendTransaction" else {
Expand Down Expand Up @@ -127,7 +127,7 @@ For example, check out implementation of chain abstraction in [sample wallet](ht

## Testing

To test Chain Abstraction, you can use the [AppKit laboratory](https://appkit-lab.reown.com/library/wagmi/) and try sending USDC with any chain abstraction supported wallet.
To test Chain Abstraction, you can use the [AppKit laboratory](https://appkit-lab.reown.com/library/wagmi/) and try sending USDC with any chain abstraction-supported wallet.
You can also use this [sample wallet](https://testflight.apple.com/join/09bTAryp) for testing.

<video controls width="100%" height="100%" style={{ borderRadius: '10px' }}>
Expand Down
10 changes: 5 additions & 5 deletions docs/walletkit/react-native/experimental/chain-abstraction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ For example, when an app requests a 100 USDC payment on Base network but the use
## How It Works

:::note
Apps need to pass `gas` as null, while sending a transaction to allow proper gas estimation by the wallet. Refer to this [guide](../../../appkit/next/experimental/chain-abstraction.mdx) for more details.
Apps need to pass `gas` as null when sending a transaction to allow proper gas estimation by the wallet. Refer to this [guide](../../../appkit/next/experimental/chain-abstraction.mdx) for more details.
:::

When sending a transaction, you need to:
1. Check if the required chain has enough funds to complete the transaction or not
1. Check if the required chain has enough funds to complete the transaction
2. If not, use the `prepare` method to generate necessary bridging transactions
3. Check the status of the bridging transactions and wait for them to be completed
3. Check the status of the bridging transactions and wait for them to complete
4. Once the bridging transactions are completed, execute the initial transaction

The following sequence diagram illustrates the complete flow of a chain abstraction operation, from the initial dapp request to the final transaction confirmation
Expand Down Expand Up @@ -55,10 +55,10 @@ public abstract status(params: {

### Usage

When your wallet receives an `eth_sendTransaction` request, first check if chain abstraction is needed using the `prepare` method, if it is, you need to sign all the fulfilment transactions and broadcast them in parallel.
When sending a transaction, first check if chain abstraction is needed using the `prepare` method. If it is needed, you need to sign all the fulfillment transactions and broadcast them in parallel.
After that, you need to call the `status` method to check the status of the fulfillment operation.

If the operation is successful, you need to broadcast the initial transaction and await for the transaction hash and receipt.
If the operation is successful, you need to broadcast the initial transaction and await the transaction hash and receipt.
If the operation is not successful, you need to send the JsonRpcError to the dapp and display the error to the user.

```typescript
Expand Down

0 comments on commit ac470ca

Please sign in to comment.