debugging statements for provisionBondId

This commit is contained in:
Michael Shaw 2023-02-17 12:06:58 -05:00
parent 2870a7543a
commit 84fed44808

View File

@ -25,9 +25,11 @@ export const getBaseConfig = async (path: string) => {
*/ */
export const provisionBondId = async (registry: Registry, privateKey: string, fee: Fee) => { export const provisionBondId = async (registry: Registry, privateKey: string, fee: Fee) => {
let bonds = await registry.queryBonds(); let bonds = await registry.queryBonds();
console.log("found bonds: " + bonds.length)
if (!bonds.length) { if (!bonds.length) {
await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee); await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
bonds = await registry.queryBonds(); bonds = await registry.queryBonds();
console.log("created bond and got back: " + bonds.length)
} }
return bonds[0].id; return bonds[0].id;