Skip to content

Commit

Permalink
Should create 1 rule with all whitelisted addresses for HSM ckcc (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
habibitcoin authored Mar 26, 2024
1 parent bee2fc2 commit 28fd226
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scripts/generate_coldcard_hsm_policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,18 @@ const get_whitelist = () => {
}

const get_whitelist_rules = () => {
const rules = get_whitelist().map((item_address) => {
return {
description: item_address.description,
whitelist: [item_address.address],
const whitelistAddresses = get_whitelist().map((item_address) => item_address.address)
const rules = [
{
description: 'Combined Whitelist',
whitelist: [...new Set(whitelistAddresses)], // Ensure addresses are unique
per_period: null,
max_amount: null,
users: [],
local_conf: false,
wallet: null,
}
})
},
]
return rules
}

Expand Down

0 comments on commit 28fd226

Please sign in to comment.