Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing attributes on the Address interface #1871

Closed
petertonysmith94 opened this issue Mar 13, 2024 · 3 comments
Closed

Missing attributes on the Address interface #1871

petertonysmith94 opened this issue Mar 13, 2024 · 3 comments
Labels
chore Issue is a chore

Comments

@petertonysmith94
Copy link
Contributor

petertonysmith94 commented Mar 13, 2024

Summary

Add the follow attributes to [AbstractAddress], so that types can be used as expected:

  • bech32Address
  • toEvmAddress
  • toAssetId

Reproduction

Example use with Wallet address

import type { Address, WalletLocked, WalletUnlocked } from 'fuels';
import { FUEL_NETWORK_URL, Provider, Wallet } from 'fuels';

const myWallet: WalletUnlocked = Wallet.generate({ provider });
const address: Address = myWallet.address;
const someWallet: WalletLocked = Wallet.fromAddress(address, provider);

Received the following error

Type 'AbstractAddress' is missing the following properties from type 'Address': bech32Address, toEvmAddress, toAssetId
ts(2739)
@petertonysmith94 petertonysmith94 added the chore Issue is a chore label Mar 13, 2024
@petertonysmith94 petertonysmith94 self-assigned this Mar 13, 2024
@arboleya
Copy link
Member

In the long run, this might not make sense. 🤔

Please check what I said here.

@petertonysmith94
Copy link
Contributor Author

That makes sense!

This issue will be resolved by the removal of AbtractAddress - see #1584

@petertonysmith94 petertonysmith94 removed their assignment Mar 13, 2024
@petertonysmith94
Copy link
Contributor Author

Closed in favour of #1584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

No branches or pull requests

2 participants