[beta] Backporting (#6675)
* Required validators >= num owners (#6551) * Debounce sync status. (#6572) * Fixed network protocol version negotiation * Renamed RPC receipt statusCode field to status * Fixed RETURNDATA size for built-ins
This commit is contained in:
@@ -281,6 +281,12 @@ export default class CreateWalletStore {
|
||||
const daylimitValidation = validateUint(_wallet.daylimit);
|
||||
const nameValidation = validateName(_wallet.name);
|
||||
|
||||
const owners = _wallet.owners.filter((owner) => !/^(0x)?0*$/.test(owner));
|
||||
|
||||
if (_wallet.required > owners.length) {
|
||||
requiredValidation.valueError = 'the number of required validators should be lower or equal the number of owners';
|
||||
}
|
||||
|
||||
const errors = {
|
||||
address: addressValidation.addressError,
|
||||
account: accountValidation.addressError,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual, debounce } from 'lodash';
|
||||
|
||||
import { LOG_KEYS, getLogger } from '~/config';
|
||||
import UpgradeStore from '~/modals/UpgradeParity/store';
|
||||
@@ -179,6 +179,12 @@ export default class Status {
|
||||
});
|
||||
}
|
||||
|
||||
_updateStatus = debounce(status => {
|
||||
this._store.dispatch(statusCollection(status));
|
||||
}, 2500, {
|
||||
maxWait: 5000
|
||||
});
|
||||
|
||||
_subscribeEthSyncing = () => {
|
||||
return this._api.pubsub
|
||||
.eth
|
||||
@@ -187,7 +193,7 @@ export default class Status {
|
||||
return;
|
||||
}
|
||||
|
||||
this._store.dispatch(statusCollection({ syncing }));
|
||||
this._updateStatus({ syncing });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -198,6 +204,7 @@ export default class Status {
|
||||
if (error || !netPeers) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._store.dispatch(statusCollection({ netPeers }));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user