@cryptorubic/web3 1.1.0-alpha-stellar.55 → 1.1.0-alpha-stellar.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptorubic/web3",
3
- "version": "1.1.0-alpha-stellar.55",
3
+ "version": "1.1.0-alpha-stellar.56",
4
4
  "dependencies": {
5
5
  "@ethersproject/bignumber": "^5.8.0",
6
6
  "@mysten/sui": "^1.24.0",
@@ -115,9 +115,9 @@ class StellarAdapter extends abstract_adapter_1.AbstractAdapter {
115
115
  return userBalance.gte(token.weiAmount);
116
116
  }
117
117
  async needTrustline(token, walletAddress) {
118
- if (token.isNative) {
118
+ const isCorrectWalletAddress = await web3_pure_1.Web3Pure.isAddressCorrect(core_1.BLOCKCHAIN_NAME.STELLAR, walletAddress);
119
+ if (token.isNative || !isCorrectWalletAddress)
119
120
  return false;
120
- }
121
121
  try {
122
122
  const trustline = await this.public.getTrustline(walletAddress, this.convertTokenAddressToAsset(token.address));
123
123
  return new bignumber_js_1.default(trustline.limit().toString()).lt(token.weiAmount);