CirclesUBI / circles-groups-safe-app

[DEPRECATED] Mint Circles group tokens using this Safe app
https://groups.circlesubi.dev/
1 stars 1 forks source link

[Bugfix] Group member can not mint #172

Closed LaimeJesus closed 2 years ago

LaimeJesus commented 2 years ago

related #171

Description

This PR fixes a case when the pathfinder does not find a correct path from a group member to a group:

In this case, when there is a direct relationship between the user and the group, the expected user to be used in the group mint method is the transaction sender (safe address)

Path from Pathfinder example

[
  {
    "from": "0xff7D68f4BE5381Ae7d4Df449E134D51E8246C7b8",
    "to": "0x8c767b35123496469b21af9Df28B1927B77441A7",
    "token": "0x01a5Fbd89Facc9612A677017779cDfB6FCc653D5",
    "tokenOwner": "0xff7D68f4BE5381Ae7d4Df449E134D51E8246C7b8",
    "value": "10000000000000000000"
  }
]

Example

Safe account will be used: 0xff7D68f4BE5381Ae7d4Df449E134D51E8246C7b8

Without fix mint-does-not-have-collaterals-to-mint

With fix user-should-be-able-to-mint

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
circles-groups-safe-app ✅ Ready (Inspect) Visit Preview Aug 5, 2022 at 1:36PM (UTC)