4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00

Improved error message when attempting to create a transaction with no reference transaction (which in practice is the same thing as having a zero balance).

This was previously in the UI repository but wasn't copied over to qortal-ui. It probably didn't make it into any releases yet.
This commit is contained in:
CalDescent 2022-02-04 19:42:04 +00:00
parent 87d34873bb
commit eed7c9d190

View File

@ -47,6 +47,10 @@ export default class TransactionBase {
}, },
() => { () => {
if (!(this._lastReference instanceof Uint8Array && this._lastReference.byteLength == 64)) { if (!(this._lastReference instanceof Uint8Array && this._lastReference.byteLength == 64)) {
if (this._lastReference == 0) {
// No prior transactions exist
return 'Invalid last reference. Please ensure that you have at least 0.001 QORT for the transaction fee.'
}
return 'Invalid last reference: ' + this._lastReference return 'Invalid last reference: ' + this._lastReference
} }
return true return true