Skip to content

Commit

Permalink
Add types
Browse files Browse the repository at this point in the history
  • Loading branch information
yagopv committed Dec 10, 2024
1 parent d4bde5d commit 0f852b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/protocol-kit/src/types/safeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export type HexAddress = string
export type PrivateKey = string
export type HttpTransport = string
export type SocketTransport = string
export type SafeSigner = HexAddress | PrivateKey | PasskeyClient
export type SafeSigner = HexAddress | PrivateKey | PasskeyArgType | PasskeyClient

export type SafeProviderConfig = {
/** signerOrProvider - Ethers signer or provider */
Expand Down
12 changes: 8 additions & 4 deletions packages/sdk-starter-kit/src/BaseClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import Safe, {
AddOwnerTxParams,
AddPasskeyOwnerTxParams,
RemoveOwnerTxParams,
RemovePasskeyOwnerTxParams,
SwapOwnerTxParams
} from '@safe-global/protocol-kit'
import SafeApiKit from '@safe-global/api-kit'
Expand Down Expand Up @@ -85,10 +87,12 @@ export class BaseClient {
/**
* Encodes the data for adding a new owner to the Safe.
*
* @param {AddOwnerTxParams} addOwnerParams - The parameters for adding a new owner
* @param {AddOwnerTxParams | AddPasskeyOwnerTxParams} addOwnerParams - The parameters for adding a new owner
* @returns {TransactionBase} The encoded data
*/
async createAddOwnerTransaction(addOwnerParams: AddOwnerTxParams): Promise<TransactionBase> {
async createAddOwnerTransaction(
addOwnerParams: AddOwnerTxParams | AddPasskeyOwnerTxParams
): Promise<TransactionBase> {
const addOwnerTransaction = await this.protocolKit.createAddOwnerTx(addOwnerParams)

return this.#buildTransaction(addOwnerTransaction)
Expand All @@ -97,11 +101,11 @@ export class BaseClient {
/**
* Encodes the data for removing an owner from the Safe.
*
* @param {RemoveOwnerTxParams} removeOwnerParams - The parameters for removing an owner
* @param {RemoveOwnerTxParams | RemovePasskeyOwnerTxParams} removeOwnerParams - The parameters for removing an owner
* @returns {TransactionBase} The encoded data
*/
async createRemoveOwnerTransaction(
removeOwnerParams: RemoveOwnerTxParams
removeOwnerParams: RemoveOwnerTxParams | RemovePasskeyOwnerTxParams
): Promise<TransactionBase> {
const removeOwnerTransaction = await this.protocolKit.createRemoveOwnerTx(removeOwnerParams)

Expand Down

0 comments on commit 0f852b3

Please sign in to comment.