We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If a response's attribute value is set to the default string (null/empty), the WasmMsg will error out with an error like such:
Error { context: "Error executing WasmMsg:\n sender: dao\n Execute { contract_addr: \"contract0\", msg: {\"extension\":{\"msg\":{\"update_token_role\":{\"token_id\":\"1\",\"role\":null}}}}, funds: [] }", source: EmptyAttributeValue { key: "role", }, }
Example from cw721-roles with test:
dao-contracts/contracts/external/cw721-roles/src/contract.rs
Line 329 in 3ab7017
app.execute_contract( Addr::unchecked(DAO), cw721_addr.clone(), &ExecuteMsg::Extension { msg: ExecuteExt::UpdateTokenRole { token_id: "1".to_string(), role: None, }, }, &[], ) .unwrap_err();
Some cases like the proposal execute error logging cannot be defaulted, because it is set up to always contain an err. (should fix anyway though)
dao-contracts/contracts/proposal/dao-proposal-single/src/contract.rs
Line 1084 in 3ab7017
The text was updated successfully, but these errors were encountered:
Fix unwrap_or_default attr values
f9730c1
Closes DA0-DA0#828
Successfully merging a pull request may close this issue.
If a response's attribute value is set to the default string (null/empty), the WasmMsg will error out with an error like such:
Example from cw721-roles with test:
dao-contracts/contracts/external/cw721-roles/src/contract.rs
Line 329 in 3ab7017
Some cases like the proposal execute error logging cannot be defaulted, because it is set up to always contain an err. (should fix anyway though)
dao-contracts/contracts/proposal/dao-proposal-single/src/contract.rs
Line 1084 in 3ab7017
The text was updated successfully, but these errors were encountered: