Skip to content
Merged
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
9 changes: 8 additions & 1 deletion packages/dapp-connector/src/WalletApi/Cip30Wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ export type WalletProperties = {
* This is the way the Nami wallet works and some DApps rely on it (i.e. https://app.indigoprotocol.io/)
*/
getCollateralEmptyArray?: boolean;
/**
* Add the `on` and `off` methods to the experimental object.
* The methods do not have an implementation, but are used to satisfy
* some DApps that expect them to be present.
*/
onOffDummyMethods?: boolean;
};
};

Expand Down Expand Up @@ -164,7 +170,8 @@ export class Cip30Wallet {
const baseApi: Cip30WalletApiWithPossibleExtensions = {
// Add experimental.getCollateral to CIP-30 API
experimental: {
getCollateral: async (params?: { amount?: Cbor }) => this.#wrapGetCollateral(params)
getCollateral: async (params?: { amount?: Cbor }) => this.#wrapGetCollateral(params),
...(this.#deviations?.onOffDummyMethods && { off: () => void 0, on: () => void 0 })
},
getBalance: () => walletApi.getBalance(),
getChangeAddress: () => walletApi.getChangeAddress(),
Expand Down
Loading