| 182 | } |
| 183 | |
| 184 | QString formatBitcoinURI(const SendCoinsRecipient &info) |
| 185 | { |
| 186 | QString ret = QString("bitcoingold:%1").arg(info.address); |
| 187 | int paramCount = 0; |
| 188 | |
| 189 | if (info.amount) |
| 190 | { |
| 191 | ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::BTG, info.amount, false, BitcoinUnits::separatorNever)); |
| 192 | paramCount++; |
| 193 | } |
| 194 | |
| 195 | if (!info.label.isEmpty()) |
| 196 | { |
| 197 | QString lbl(QUrl::toPercentEncoding(info.label)); |
| 198 | ret += QString("%1label=%2").arg(paramCount == 0 ? "?" : "&").arg(lbl); |
| 199 | paramCount++; |
| 200 | } |
| 201 | |
| 202 | if (!info.message.isEmpty()) |
| 203 | { |
| 204 | QString msg(QUrl::toPercentEncoding(info.message)); |
| 205 | ret += QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg); |
| 206 | paramCount++; |
| 207 | } |
| 208 | |
| 209 | return ret; |
| 210 | } |
| 211 | |
| 212 | bool isDust(interfaces::Node& node, const QString& address, const CAmount& amount) |
| 213 | { |
no test coverage detected