@fluent.xyz/connect 0.8.0 → 0.8.1

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/dist/internal.js CHANGED
@@ -4576,7 +4576,8 @@ async function readFluentTokenBalances(params) {
4576
4576
  return Promise.all(
4577
4577
  params.tokens.map(async (token) => {
4578
4578
  const native = isFluentNativeToken(token);
4579
- if (!native && !token.address) {
4579
+ const address = native ? void 0 : token.address;
4580
+ if (!native && !address) {
4580
4581
  return {
4581
4582
  ...token,
4582
4583
  raw: null,
@@ -4585,12 +4586,12 @@ async function readFluentTokenBalances(params) {
4585
4586
  };
4586
4587
  }
4587
4588
  try {
4588
- const raw = native ? await params.client.getBalance({ address: params.account }) : await params.client.readContract({
4589
- address: token.address,
4589
+ const raw = address ? await params.client.readContract({
4590
+ address,
4590
4591
  abi: balanceOfAbi,
4591
4592
  functionName: "balanceOf",
4592
4593
  args: [params.account]
4593
- });
4594
+ }) : await params.client.getBalance({ address: params.account });
4594
4595
  return {
4595
4596
  ...token,
4596
4597
  raw,