Skip to content

Commit

Permalink
amend the verified freelancer only flag
Browse files Browse the repository at this point in the history
  • Loading branch information
samelamin committed Dec 16, 2023
1 parent 3da76f2 commit 870f0a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/components/HirePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export const HirePopup = ({
const milestones = application.milestones.map((m: any) => ({
percentageToUnlock: parseInt(m.percentage_to_unlock),
}));

const result = await chainService?.hireFreelancer(
account,
briefOwners,
Expand All @@ -143,7 +144,8 @@ export const HirePopup = ({
briefHash,
currencyId,
milestones,
application.payment_address
application.payment_address,
brief.verified_only
);
// eslint-disable-next-line no-constant-condition
while (true) {
Expand Down
8 changes: 5 additions & 3 deletions src/redux/services/chainService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ class ChainService {
briefHash: string,
currencyId: number,
milestones: any[],
paymentAddress: string
paymentAddress: string,
onlyFellowshipFreelancers: boolean
): Promise<BasicTxResponse> {
let currency: any = currencyId;
let onchainPaymentAddress: any = null;
const requireFellowshipApproval = true;
switch (currencyId) {
case Currency.ETH:
case Currency.USDT: {
Expand All @@ -127,6 +127,7 @@ class ChainService {
break;
}
}

const extrinsic = this.imbueApi.imbue.api.tx.imbueBriefs.createBrief(
briefOwners,
freelancerAddress,
Expand All @@ -136,7 +137,7 @@ class ChainService {
currency,
milestones,
onchainPaymentAddress,
requireFellowshipApproval
onlyFellowshipFreelancers
);

return await this.submitImbueExtrinsic(
Expand Down Expand Up @@ -566,6 +567,7 @@ class ChainService {
if (!projectOnChain) {
return;
}

const raisedFunds = BigInt(
projectOnChain?.raisedFunds?.replaceAll(',', '') || 0
);
Expand Down

0 comments on commit 870f0a6

Please sign in to comment.