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

fix(wallet): preserve parent when recording substate addresses #955

Merged
merged 7 commits into from Mar 12, 2024

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Mar 5, 2024

Description

fix(wallet): preserve parent when recording substate addresses

Motivation and Context

If an account deposits a previously known resource into its account, it will mistakenly change the parent component to the account.

This is a workaround/hack to fix this, by never changing the initial parent once it has been set. The ideal fix would involve the validator node/indexer returning a more formal component-resource relationship to the wallet.

Due to the limited/inferred relationship data, a wallet will still list a resource parent as the account component in cases where it has not seen the resource before.

How Has This Been Tested?

Manually submitted a transaction that creates a resource via a component, then transactions that deposit some of that resource into the wallet. The parent component does not change after the initial transaction.

What process can a PR reviewer use to test or verify this change?

Upcoming NFT testing PR (https://github.com/Cifko/tari-dan/blob/dan-testing/applications/dan_testing/src/main.rs)

Breaking Changes

  • None
  • Requires data directory to be deleted
  • Other - Please specify

Copy link

github-actions bot commented Mar 5, 2024

Test Results (CI)

476 tests   467 ✅  3h 33m 15s ⏱️
 48 suites    0 💤
  1 files      9 ❌

For more details on these failures, see this check.

Results for commit 629cc9f.

♻️ This comment has been updated with latest results.

@sdbondi sdbondi merged commit de382d4 into tari-project:development Mar 12, 2024
10 checks passed
@sdbondi sdbondi deleted the wallet-dont-change-parent branch March 12, 2024 10:41
sdbondi added a commit to sdbondi/tari-dan that referenced this pull request Mar 12, 2024
* development:
  fix(wallet): preserve parent when recording substate addresses (tari-project#955)
  refactor(engine)!: store NFT data as CBOR value (tari-project#957)
  fix(vn/webui): fix template table (tari-project#962)
  fix(walletd): fix query for NonFungible (tari-project#950)
  refactor(tx-builder): allow building unsigned transactions (tari-project#939)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants