Code Monkey home page Code Monkey logo

zond's People

Contributors

cyyber avatar fr1t2 avatar jackalyst avatar jplomas avatar playfaculty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

zond's Issues

zond-cli wallet list fails with wallet.json file containing more than 10 addresses

Expected Behavior

./zond-cli wallet list should return a list of all addresses contained in the wallet with index, address, and balance printed to console.

1	0x20d3b46b6f8dceca60278bf19f58c3859465cdc5	0
2	0x202d32684da044f95790081d3b7faa67c52dd538	0
3	0x100500d675ce9ba29be44f2abb09a85cf6a97c3d	0
4	0x100500edb120720e9bca79ea769fe0a5a02febb9	0
5	0x100500176d7b913edcc8ce5309a335cb1ff7fc9d	0
6	0x200117c87b91da26b8c1aa823cad3b6ad30f7e8d	0
7	0x20bf1acdae054f4194e0c132b489e8f9099caf8c	0
8	0x1005009094f8c335059ab9b3ebc421e10c131de5	0
9	0x1005003ea6ed78d597e7411a8ddbc2dffd8839e5	0
10	0x1005007372c097245a20174d6738743f58c053e2	0
11	0x1005007372c097245a20174d6738743f58c053e2	0
...

Current Behavior

When the wallet contains more than 10 addresses, the printed list stops at index 10 and throws an error.

./zond-cli wallet list 

1	0x20d3b46b6f8dceca60278bf19f58c3859465cdc5	0
2	0x202d32684da044f95790081d3b7faa67c52dd538	0
3	0x100500d675ce9ba29be44f2abb09a85cf6a97c3d	0
4	0x100500edb120720e9bca79ea769fe0a5a02febb9	0
5	0x100500176d7b913edcc8ce5309a335cb1ff7fc9d	0
6	0x200117c87b91da26b8c1aa823cad3b6ad30f7e8d	0
7	0x20bf1acdae054f4194e0c132b489e8f9099caf8c	0
8	0x1005009094f8c335059ab9b3ebc421e10c131de5	0
9	0x1005003ea6ed78d597e7411a8ddbc2dffd8839e5	0
10	0x1005007372c097245a20174d6738743f58c053e2	0
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 1 [running]:
github.com/theQRL/zond/wallet.(*Wallet).reqBalance(0xb09360?, {0xc00002eff0, 0x2a})
	/home/ubuntu/NewZond/zond/wallet/wallet.go:113 +0x3c5
github.com/theQRL/zond/wallet.(*Wallet).List(0xc00019f8d0)
	/home/ubuntu/NewZond/zond/wallet/wallet.go:119 +0x69
github.com/theQRL/zond/cli/commands.getWalletSubCommands.func3(0xc00016fe30?)
	/home/ubuntu/NewZond/zond/cli/commands/wallet.go:49 +0x5a
github.com/urfave/cli/v2.(*Command).Run(0xc0000e7440, 0xc00011a4c0)
	/home/ubuntu/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:164 +0x5dc
github.com/urfave/cli/v2.(*App).RunAsSubcommand(0xc0000ca780, 0xc00011a240)
	/home/ubuntu/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:427 +0xcca
github.com/urfave/cli/v2.(*Command).startApp(0xc0000e7680, 0xc00011a240)
	/home/ubuntu/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0x72f
github.com/urfave/cli/v2.(*Com
[wallet.json.md](https://github.com/theQRL/zond/files/9528556/wallet.json.md)
mand).Run(0xc000166540?, 0x2?)
	/home/ubuntu/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:94 +0xba
github.com/urfave/cli/v2.(*App).RunContext(0xc0000ca600, {0xb0c570?, 0xc00002a650}, {0xc000024180, 0x3, 0x3})
	/home/ubuntu/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:306 +0xbfd
github.com/urfave/cli/v2.(*App).Run(...)
	/home/ubuntu/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:215
main.main()
	/home/ubuntu/NewZond/zond/cmd/zond-cli/zond-cli.go:30 +0xda

Steps to Reproduce

  1. Enter the command ./zond-cli wallet add-xmss or ./zond-cli wallet add-dilithium more than 10 times, creating 11+ addresses in a single wallet.json file
  2. Enter command ./zond-cli wallet list

Context (Environment)

lsb_release -a
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.7 LTS
Release:	16.04
Codename:	xenial
go version

go version go1.19.1 linux/amd64

wallet.json file attached re-named to wallet.json.md for GitHub file type restrictions

wallet.json.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.