Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dasanra committed Nov 23, 2023
1 parent e5dc463 commit de1f687
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
16 changes: 14 additions & 2 deletions safe-core-sdk/api-kit/migrating/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide aims to be a reference of the major changes between v1 and v2 to help

## API Kit constructor

Now it won't be necessary to specify a `txServiceUrl` in those environments where Safe has a Transaction Service running, specifiying the chain ID will be enough. If you want to use your custom service or use the kit in a chain not supported by a Safe Transaction Service, you can add `txServiceUrl` parameter.
Now it won't be necessary to specify a `txServiceUrl` in those environments where Safe has a Transaction Service running, providing the chain ID will be enough. If you want to use your custom service or use the kit in a chain not supported by a Safe Transaction Service, you can add `txServiceUrl` parameter.

```js
// old:
Expand All @@ -16,7 +16,19 @@ constructor({ chainId, txServiceUrl? }: SafeApiKitConfig)
## Use the route you prefer
API Kit v1 forced the use of a custom service hosted under `/api` route of the URL specified in `txServiceUrl`. This is not the case anymore, you can specify any route you prefer or subdomain.
API Kit v1 forced that any custom service was hosted under `/api` route of the URL specified in `txServiceUrl`. This isn't the case anymore, you can specify any route you prefer or subdomain.
Note that if you use a custom service running under `/api` you will now need to migrate as follow:
```js
// old:
const txServiceUrl = 'https://your-transaction-service-domain/'
constructor({ txServiceUrl, ethAdapter }: SafeApiKitConfig)

// new:
const txServiceUrl = 'https://your-transaction-service-domain/api'
constructor({ chainId, txServiceUrl? }: SafeApiKitConfig)
```
## MasterCopy to Singleton
Expand Down
4 changes: 2 additions & 2 deletions safe-core-sdk/protocol-kit/migrating/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ SafeFactory.create({ ethAdapter, isL1SafeSingleton: true })

## Ethers v6

From protocolKit v2, EthersAdapter will only be compatible with ethers.js v6. If you still need to use v5 we recommend you to keep protocolKit v1, but encourage you to migrate to the latest version when you have the chance.
From `protocolKit v2`, EthersAdapter will only be compatible with ethers.js v6. If you still need to use v5 we recommend you to keep `protocolKit v1`, but we encourage you to migrate to the latest version when you have the chance.

## Protocol Kit createTransaction() accepts only transaction array

In protocolKit v1 the `createTranasction()` method accepted either an object or an array as parameter. To avoid confusion we aligned to accept an array only. Migration can be done as the code below:
In `protocolKit v1` the `createTranasction()` method accepted either an object or an array as parameter. To avoid confusion we aligned to accept only an array. Here is a migration example:

```js
// old:
Expand Down
4 changes: 2 additions & 2 deletions safe-core-sdk/relay-kit/migrating/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ This guide aims to be a reference of the major changes between v1 and v2 to help

## GelatoRelayPack

- The `GelatoRelayPack` constructor now includes a mandatory `protocolKit` parameter as we made it required for any new pack extending the `RelayKitBasePack`
- The `GelatoRelayPack` constructor now includes a mandatory `protocolKit` parameter. It's required for any new pack extending the `RelayKitBasePack`.

```js
constructor({ apiKey, protocolKit }: GelatoOptions)
```

- We removed the `protocolKit` parameter from `createTransactionWithHandlePayment()`, `createTransactionWithTransfer()` and `executeRelayTransaction()` methods in the `GelatoRelayPack` as we now it's included in the constructor.
- We removed the `protocolKit` parameter from `createTransactionWithHandlePayment()`, `createTransactionWithTransfer()` and `executeRelayTransaction()` methods in the `GelatoRelayPack` as now it's included in the constructor.

- Removed the type `export interface RelayPack` as we use now an abstract class.

0 comments on commit de1f687

Please sign in to comment.