()
| 97 | } |
| 98 | |
| 99 | func showAllTokenBalance() { |
| 100 | var ( |
| 101 | stableCoinBalance uint64 |
| 102 | covenantCoinBalance uint64 |
| 103 | err error |
| 104 | ) |
| 105 | |
| 106 | if stableCoinBalance, err = client.GetTokenBalance(types.Particle); err != nil { |
| 107 | if strings.Contains(err.Error(), "no such token balance") { |
| 108 | fmt.Println("Your account is not created in the TestNet, please apply tokens from our faucet first.") |
| 109 | } else { |
| 110 | ConsoleLog.WithError(err).Error("get Particle balance failed") |
| 111 | } |
| 112 | |
| 113 | SetExitStatus(1) |
| 114 | return |
| 115 | } |
| 116 | |
| 117 | if covenantCoinBalance, err = client.GetTokenBalance(types.Wave); err != nil { |
| 118 | if strings.Contains(err.Error(), "no such token balance") { |
| 119 | fmt.Println("Your account is not created in the TestNet, please apply tokens from our faucet first.") |
| 120 | } else { |
| 121 | ConsoleLog.WithError(err).Error("get Wave balance failed") |
| 122 | } |
| 123 | |
| 124 | SetExitStatus(1) |
| 125 | return |
| 126 | } |
| 127 | |
| 128 | fmt.Printf("Particle balance is: %d\n", stableCoinBalance) |
| 129 | fmt.Printf("Wave balance is: %d\n", covenantCoinBalance) |
| 130 | } |
| 131 | |
| 132 | func showDatabaseDeposit(dsn string) { |
| 133 | dsnCfg, err := client.ParseDSN(dsn) |
no test coverage detected