if hf24 update operations

This commit is contained in:
feruz 2020-07-18 09:09:38 +03:00
parent bce474147b
commit 3fa274e1a5
2 changed files with 8 additions and 1 deletions

View File

@ -48,6 +48,13 @@ export const checkClient = async () => {
client = new Client(selectedServer, {
timeout: 5000,
});
client.database.getVersion().then((res) => {
if (res.blockchain_version !== '0.23.0') {
// true: eclipse rebranded rpc nodes
// false: default old nodes (not necessary to call for old nodes)
client.updateOperations(true);
}
});
};
checkClient();

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Platform } from 'react-native';
import { connect } from 'react-redux';
import { Client } from '@hvieio/dhive';
import { Client } from '@hiveio/dhive';
import VersionNumber from 'react-native-version-number';
import Config from 'react-native-config';
import { injectIntl } from 'react-intl';