this is the first time to use this forum and sorry for an inconvenience.
Here are original codes.
deposit(tokenAddress: string, amount: BigNumber, userAddress: string) {
return from(Moralis.Web3.enableWeb3()).pipe(
concatNetworkVerification(),
concatMap(() => {
return from<ObservableInput<any>>(Moralis.Web3.executeFunction({
contractAddress: "0xxx",
abi: xxx.abi,
functionName: 'deposit',
params: {
token: tokenAddress,
amount: amount,
to: userAddress
},
}));
})
);
}
depositAvax(amount: BigNumber) {
return from(Moralis.Web3.enableWeb3()).pipe(
concatNetworkVerification(),
concatMap(() => {
return from<ObservableInput<any>>(Moralis.Web3.executeFunction({
contractAddress: "0xxxx",
abi: xxx.abi,
functionName: 'deposit',
msgValue: amount.toString()
}));
})
);
}
Since it didn’t work properly I have made some modifications so that it gets fixed.