Skip to content

Commit

Permalink
Feat: pay function
Browse files Browse the repository at this point in the history
  • Loading branch information
theocdl committed Feb 7, 2024
1 parent 3fb74e6 commit 483113b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 3 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export async function run(): Promise<void> {
console.log('privateKey:', privateKey)
console.log('amount:', amount)

// TODO: trigger on-chain txs
const take = await pattini.take(
issueNumber,
amount,
Expand All @@ -89,21 +88,21 @@ export async function run(): Promise<void> {

const takeReceipt = await take.wait(1)
console.log('take:', takeReceipt.hash)
} else {
} else if (action === 'pull_request') {
console.log('action:', action)
console.log('issueNumber:', issueNumber)
console.log('contractAddress:', contractAddress)
console.log('pullRequestNumber:', pullRequestNumber)
console.log('recipientAddress:', recipientAddress)
console.log('privateKey:', privateKey)
}

// pay
// const pullRequestNumber = 88888
// const commitHash = 'wxyz'
// const pay = await pattini.pay(issueNumber, pullRequestNumber, commitHash)
// const payReceipt = await pay.wait(1)
// console.log('pay:', payReceipt.hash)
const pay = await pattini.pay(
issueNumber,
parseInt(pullRequestNumber),
'commitHashNew'
)
console.log('pay:', pay.hash)
}

// core.setOutput('payReceipt', payReceipt.hash)
} catch (error) {
Expand Down

0 comments on commit 483113b

Please sign in to comment.