'Vue and Gnosis Safe: Cannot read properties of undefined (reading 'addListeners')

I cought error, when I tried to add listeners. Can someone help me to solve this problem? I used Vue3 and Gnosis Safe.

mounted() {
    const appsSdk = new initSdk();

const onSafeInfo = (safeInfo) => {
  this.data.safeInfo = safeInfo;

  appsSdk.initContracts();
};

const onTransactionConfirmation = ({ requestId, safeTxHash }) => {
  console.log(requestId, safeTxHash);
};

const onTransactionRejection = ({ requestId }) => {
  console.log(requestId);
};

appsSdk.addListeners({
  onSafeInfo,
  onTransactionConfirmation,
  onTransactionRejection,
});
},


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source