nifty-oss / asset

A lightweight standard for non-fungible assets.
Apache License 2.0
38 stars 8 forks source link

Cannot deserialise asset #59

Closed joefitter closed 7 months ago

joefitter commented 7 months ago

If I get all initialised assets using the GPA builder, there is one that cannot be deserialised:

B9uJhUS8LGodK71Me8TFaarertEqKbXjbze4zWeuR2xs

I've filtered this one out in my client code for now

febo commented 7 months ago

I could deserialize the asset using the CLI:

Asset: Asset {
    discriminator: Asset,
    state: Unlocked,
    standard: NonFungible,
    mutable: true,
    owner: 5jSPKaMoYvyWztrt3zxYi5T1M9Kvvwd2g7VS1kTuiYgz,
    group: NullablePublicKey(
        11111111111111111111111111111111,
    ),
    authority: 5jSPKaMoYvyWztrt3zxYi5T1M9Kvvwd2g7VS1kTuiYgz,
    delegate: Delegate {
        address: NullablePublicKey(
            11111111111111111111111111111111,
        ),
        roles: DelegateRoles(
            0,
        ),
    },
    name: "GM",
}
[
    JsonCreator {
        address: JCapwSzWyHkjuVrT5ZTyKwBHzV9oYrTNhZguAMc9PiEc,
        verified: false,
        share: 100,
    },
]
Links {
    values: [
        Link {
            name: "twitter",
            uri: "https://twitter.com/TheGentlemonke",
        },
    ],
}
Group {
    size: 1,
    max_size: Some(
        NullableU64(
            100,
        ),
    ),
}
Blob: "image/png"
royalties:
basis points:500
Constraints: Object {
    "EMPTY": Object {},
}
Metadata {
    symbol: "",
    description: "GM from GM",
    uri: "",
}

Can you share how you are trying to deserialize the account?

joefitter commented 7 months ago

oh strange, I was just calling await getAssetGpaBuilder(umi).getDeserialized().

joefitter commented 7 months ago

on v0.3.0 of the client btw

febo commented 7 months ago

Could be something with the JS client then, let me run a test.

febo commented 7 months ago

The issue was related to an asset created with a previous version of the program that did not have the delegate on the grouping extension.