Skip to content

Commit

Permalink
fix(actions): add correct param for settings (#2600)
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenijesavic authored Apr 1, 2024
1 parent 641be0b commit 9d8801a
Showing 1 changed file with 18 additions and 28 deletions.
46 changes: 18 additions & 28 deletions src/store/dao/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,36 +139,26 @@ export const updateDAOSettings = async function ({ state, rootState }, { data, a
name: 'setdaosetting',
data: {
dao_id: rootState.dao.docId,
// kvs: [[
// { label: 'voice_token_decay_period', value: ['int64', 1] },
// { label: 'voice_token_decay_per_period_x10M', value: ['int64', 1] }
// ]]
kvs: Object.keys(data).map(key => {
const valueTypes = {
// _s for string
// _i for int64
// _n for name
// _t for time_point
// _a for asset

kvs: [
{ key: 'voice_token_decay_period', value: ['int64', 1] },
{ key: 'voice_token_decay_per_period_x10M', value: ['int64', 1] }
]
number: 'int64',
string: 'string'
}

const value = data[key]
const type = valueTypes[typeof value]

// kvs: Object.keys(data).map(key => {
// const valueTypes = {
// // _s for string
// // _i for int64
// // _n for name
// // _t for time_point
// // _a for asset

// number: 'int64',
// string: 'string'
// }

// const value = data[key]
// const type = valueTypes[typeof value]

// return {
// key: camelToSnakeCase(key),
// value: [type, value]
// }
// })
return {
key: camelToSnakeCase(key),
value: [type, value]
}
})
}
}
// ...(alerts.created.length > 0
Expand Down

0 comments on commit 9d8801a

Please sign in to comment.