-
Notifications
You must be signed in to change notification settings - Fork 298
Closed
Description
Hi there - love the project!
TL;DR - Reading through the source code and tinkering, is it possible to sendbid and specify the account to send the bid from?
Edit: More details. I'm using hs-client to sendbids. Looks like:
const bid = await walletClient.execute("sendbid", [
newName,
bidAmount,
lockupAmount,
]);In the source for hsd - this repo - the rpc module doesn't appear to accept any more params (like the account name) for sendbid.
Lines 1896 to 1918 in e0d5775
| async sendBid(args, help) { | |
| if (help || args.length !== 3) | |
| throw new RPCError(errs.MISC_ERROR, 'sendbid "name" bid value'); | |
| const wallet = this.wallet; | |
| const valid = new Validator(args); | |
| const name = valid.str(0); | |
| const bid = valid.ufixed(1, EXP); | |
| const value = valid.ufixed(2, EXP); | |
| if (!name || !rules.verifyName(name)) | |
| throw new RPCError(errs.TYPE_ERROR, 'Invalid name.'); | |
| if (bid == null || value == null) | |
| throw new RPCError(errs.TYPE_ERROR, 'Invalid values.'); | |
| if (bid > value) | |
| throw new RPCError(errs.TYPE_ERROR, 'Invalid bid.'); | |
| const tx = await wallet.sendBid(name, bid, value); | |
| return tx.getJSON(this.network); | |
| } |
However...
The interface for the wallet seems to expect the account as an optional param - see:
Lines 1668 to 1673 in 592b276
| async createBid(name, value, lockup, options) { | |
| const acct = options ? options.account || 0 : 0; | |
| const mtx = await this.makeBid(name, value, lockup, acct); | |
| await this.fill(mtx, options); | |
| return this.finalize(mtx, options); | |
| } |
🕵️♂️ If that's the whole picture - whats the best way to specify a bid's account?
Would a patch be necessary/helpful? It would have to be across two libs I suppose... hsd and hs-client.
ThannThann
Metadata
Metadata
Assignees
Labels
No labels