Open auryn-macmillan opened 4 years ago
I'm still getting 400 errors on this. Something is up with the oracle but that's just a black box for me.
Can you provide an example URL that is giving you a 400 response?
I'm using https://colony.io/reputation/mainnet/0x65489dd3a30a056db2cbc5487e6174218323bf328bf7baaec8574f0c6555e759/0x49a364bce33B2B7Ef3C1B0559F6269DdD4D8159b/129/0xFb44662627FdB63dF828d3E0B79230B394113E0f
where the request is made from the code
async function getReputation(
client: ColonyClient,
skillId: BigNumberish,
address: string,
customRootHash?: string,
): Promise<ReputationOracleResponse> {
const { network, reputationOracleEndpoint } = client.networkClient;
const skillIdString = bigNumberify(skillId).toString();
const rootHash = customRootHash || (await client.networkClient.getReputationRootHash());
const response = await fetch(
`${reputationOracleEndpoint}/${network}/${rootHash}/${client.address}/${skillIdString}/${address}`,
);
const result = await response.json();
return {
...result,
reputationAmount: bigNumberify(result.reputationAmount || 0),
};
}
If I supply the zero address to this function (to get the colonywide reputation) then the request succeeds so it seems to be an issue with the user component.
Actually, now I think of it I spoke with @auryn-macmillan about this issue in a private chat a while back. I'm guessing that he hasn't completed any tasks using the safe address so it doesn't have any reputation (and so wouldn't be included in the merkle tree).
That would indeed result in a 400 response.
Right. I've been unable to finalize a task to the Gnosis Safe address because their is a bug in the dapp that wont let pay directly to an address and there is a bug in the safe app that wont let send tokens from the colony ¯_(ツ)_/¯.
@TomAFrench if you can fix #17, then we can properly test this issue.
This is a result of the reputation oracle returning a 400 error when requesting the Safe's reputation.