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

chore(api-kit): remove /api autocomplete and add missing chains #994

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/api-kit/src/SafeApiKit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
)
}

this.#txServiceBaseUrl = `${url}/api`
this.#txServiceBaseUrl = url
}
}

Expand Down Expand Up @@ -120,7 +120,7 @@
* @throws "Not Found"
* @throws "Ensure this field has at least 1 hexadecimal chars (not counting 0x)."
*/
async decodeData(data: string): Promise<any> {

Check warning on line 123 in packages/api-kit/src/SafeApiKit.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
if (data === '') {
throw new Error('Invalid data')
}
Expand Down Expand Up @@ -330,7 +330,7 @@
const { address: delegator } = this.#getEip3770Address(delegatorAddress)
const signature = await signDelegate(signer, delegate, this.#chainId)

const body: any = {

Check warning on line 333 in packages/api-kit/src/SafeApiKit.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
safe: safeAddress ? this.#getEip3770Address(safeAddress).address : null,
delegate,
delegator,
Expand Down
33 changes: 19 additions & 14 deletions packages/api-kit/src/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
export const TRANSACTION_SERVICE_URLS: Record<string, string> = {
'1': 'https://safe-transaction-mainnet.safe.global',
'10': 'https://safe-transaction-optimism.safe.global',
'56': 'https://safe-transaction-bsc.safe.global',
'100': 'https://safe-transaction-gnosis-chain.safe.global',
'137': 'https://safe-transaction-polygon.safe.global',
'324': 'https://safe-transaction-zksync.safe.global',
'1101': 'https://safe-transaction-zkevm.safe.global',
'8453': 'https://safe-transaction-base.safe.global',
'42161': 'https://safe-transaction-arbitrum.safe.global',
'42220': 'https://safe-transaction-celo.safe.global',
'43114': 'https://safe-transaction-avalanche.safe.global',
'84532': 'https://safe-transaction-base-sepolia.safe.global',
'11155111': 'https://safe-transaction-sepolia.safe.global',
'1313161554': 'https://safe-transaction-aurora.safe.global'
'1': 'https://safe-transaction-mainnet.safe.global/api',
'10': 'https://safe-transaction-optimism.safe.global/api',
'56': 'https://safe-transaction-bsc.safe.global/api',
'100': 'https://safe-transaction-gnosis-chain.safe.global/api',
'137': 'https://safe-transaction-polygon.safe.global/api',
'196': 'https://safe-transaction-xlayer.safe.global/api',
'324': 'https://safe-transaction-zksync.safe.global/api',
'1101': 'https://safe-transaction-zkevm.safe.global/api',
'5000': 'https://safe-transaction-mantle.safe.global/api',
'8453': 'https://safe-transaction-base.safe.global/api',
'42161': 'https://safe-transaction-arbitrum.safe.global/api',
'42220': 'https://safe-transaction-celo.safe.global/api',
'43114': 'https://safe-transaction-avalanche.safe.global/api',
'59144': 'https://safe-transaction-linea.safe.global/api',
'81457': 'https://safe-transaction-blast.safe.global/api',
'84532': 'https://safe-transaction-base-sepolia.safe.global/api',
'534352': 'https://safe-transaction-scroll.safe.global/api',
'11155111': 'https://safe-transaction-sepolia.safe.global/api',
'1313161554': 'https://safe-transaction-aurora.safe.global/api'
}
Loading