Merge remote-tracking branch 'origin/sa/delegation-screen' into sa/delegation-screen

This commit is contained in:
noumantahir 2022-02-09 12:52:39 +05:00
commit 33d95a1b78
3 changed files with 29 additions and 3 deletions

View File

@ -335,7 +335,7 @@ PODS:
- React
- react-native-version-number (0.3.6):
- React
- react-native-webview (11.2.3):
- react-native-webview (11.17.1):
- React-Core
- React-RCTActionSheet (0.63.4):
- React-Core/RCTActionSheetHeaders (= 0.63.4)
@ -736,7 +736,7 @@ SPEC CHECKSUMS:
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
react-native-udp: ff9d13e523f2b58e6bc5d4d32321ac60671b5dc9
react-native-version-number: b415bbec6a13f2df62bf978e85bc0d699462f37f
react-native-webview: 6520e3e7b4933de76b95ef542c8d7115cf45b68e
react-native-webview: 162b6453d074e0b1c7025242bb7a939b6f72b9e7
React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336
React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b
React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0

View File

@ -760,3 +760,22 @@ export const signUp = async (username:string, email:string, referral?:string) =>
throw error;
}
};
/**
*
* details
* @param username of user
*/
export const getReceivedVestingShares = async (username:string) => {
try {
console.log('Fetching received vesting shares entries');
return ecencyApi.get(`/private-api/received-vesting/${username}`).then((resp) => {
return resp.data ? resp.data : null
});
} catch (error) {
console.warn("Failed to get received vesting shares" + error)
bugsnagInstance.notify(error);
return error;
}
};

View File

@ -180,7 +180,9 @@ class DelegateScreen extends Component {
const username = item;
return (
<TouchableOpacity
onPress={() => {
onPress={async () => {
const receivedVS = await getReceivedVestingShares(username);
console.log('receivedVS : ', receivedVS);
this.setState({ destination: username, usersResult: [], step: 2 });
}}
style={styles.usersDropItemRow}
@ -340,6 +342,11 @@ class DelegateScreen extends Component {
this._renderInformationText(`${(totalHP - spCalculated).toFixed(3)} HP`)
}
/>
<TransferFormItem
rightComponent={() =>
this._renderInformationText(`${(totalHP - spCalculated).toFixed(3)} HP`)
}
/>
<Slider
style={styles.slider}
trackStyle={styles.track}