icon-community / CPS

Contribution Proposal System for ICON
7 stars 3 forks source link

Unable to Swap from ICX to bnUSD Using CPS Contract After Recent Update in "Balanced Router" Contract #96

Closed sdpisreddevil closed 8 months ago

sdpisreddevil commented 9 months ago

Overview

Unable to Swap from ICX to bNUSD Using CPS Contract After Recent Update in "Balanced Router" Contract.

Story

Everything seems same though the router contract has updated one optional parameter but that shouldn't be having issue.

Test Scenarios

Link given/when/then test scenarios here

Acceptance Criteria

sdpisreddevil commented 9 months ago

Blocker from the balancedRouter contract update as they send the byte[0] which was previously null. byte[0] is not handled on the CPFTreasury.tokenFallback.

Solution:

  1. CPFTreasury contract upgrade with the support of null byte array.
  2. balancedRouter contract upgrade with removal of byte[0]
sdpisreddevil commented 8 months ago

Fixed here : https://github.com/balancednetwork/balanced-java-contracts/commit/159d2f3c4be92ca960d3027137df5345e9313672