mirror of https://github.com/certusone/oyster.git
fix: support mints with 0 supply
This commit is contained in:
parent
dfd9f88b20
commit
6dffc77333
|
@ -99,6 +99,10 @@ export function GovernanceConfigFormItem({
|
|||
// If the supply is small and 1% is below the minimum mint amount then coerce to the minimum value
|
||||
let minTokenStep = Math.max(mintSupply1Percent, minTokenAmount);
|
||||
|
||||
if (maxTokenAmount === 0) {
|
||||
maxTokenAmount = 1;
|
||||
}
|
||||
|
||||
let minTokensToCreateProposal = minTokenStep;
|
||||
|
||||
if (!governanceConfig) {
|
||||
|
|
|
@ -114,7 +114,7 @@ export function getBigNumberAmount(amount: BN | number) {
|
|||
|
||||
// Formats percentage value showing it in human readable form
|
||||
export function formatPercentage(percentage: number) {
|
||||
if (percentage === 0) {
|
||||
if (percentage === 0 || percentage === Infinity) {
|
||||
return '0%';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue