SafeGetShare function
common/type_convert.go
GetShare()
returns percentage ownership of an asset.
Should also create a SafeGetShare()
with pseudocode as follows:
func SafeGetShare(part, total, allocation cosmos.Uint) cosmos.Uint {
return GetShare(min(part,total), total, allocation)
}
And change call sites that don't need more than 100% of asset returned to use SafeGetShare, for example calcTargetYggCoins