AraBlocks / ara-contracts

Blockchain interactions in Ara modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allocate rewards fails because it passes non-strings to expandTokenValue

bplaster opened this issue · comments

Expected Behavior

allocate in rewards.js should pass strings to expandTokenValue, or expandTokenValue should accept non-strings.

Actual Behavior

expandTokenValue in token.js expects a string, but allocate in rewards.js passes in numbers.

  const validRewards = isValidArray(rewards, (reward) => {
    if (reward <= 0) {
      return false
    }
  })

  rewards = rewards.map(i => token.expandTokenValue(i))