File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed 
packages/dapp-connector/src/WalletApi Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ export type WalletProperties = {
5656     * This is the way the Nami wallet works and some DApps rely on it (i.e. https://app.indigoprotocol.io/) 
5757     */ 
5858    getCollateralEmptyArray ?: boolean ; 
59+     /** 
60+      * Add the `on` and `off` methods to the experimental object. 
61+      * The methods do not have an implementation, but are used to satisfy 
62+      * some DApps that expect them to be present. 
63+      */ 
64+     onOffDummyMethods ?: boolean ; 
5965  } ; 
6066} ; 
6167
@@ -164,7 +170,8 @@ export class Cip30Wallet {
164170    const  baseApi : Cip30WalletApiWithPossibleExtensions  =  { 
165171      // Add experimental.getCollateral to CIP-30 API 
166172      experimental : { 
167-         getCollateral : async  ( params ?: {  amount ?: Cbor  } )  =>  this . #wrapGetCollateral( params ) 
173+         getCollateral : async  ( params ?: {  amount ?: Cbor  } )  =>  this . #wrapGetCollateral( params ) , 
174+         ...( this . #deviations?. onOffDummyMethods  &&  {  off : ( )  =>  void  0 ,  on : ( )  =>  void  0  } ) 
168175      } , 
169176      getBalance : ( )  =>  walletApi . getBalance ( ) , 
170177      getChangeAddress : ( )  =>  walletApi . getChangeAddress ( ) , 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments