Skip to content

Commit

Permalink
Update cancel contract method names (#26)
Browse files Browse the repository at this point in the history
* Update cancel contract method names

* Update libs

Co-authored-by: Raymond Jacobson <ray@audius.co>
  • Loading branch information
2 people authored and michellebrier committed Oct 9, 2023
1 parent e77a76b commit a17c671
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions packages/protocol-dashboard/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/protocol-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@audius/libs": "1.1.3",
"@audius/libs": "1.1.4",
"@audius/stems": "^0.3.3",
"@reduxjs/toolkit": "^1.4.0",
"chart.js": "^2.9.3",
Expand Down
8 changes: 4 additions & 4 deletions packages/protocol-dashboard/src/services/Audius/delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ export default class Delegate {
return info
}

async cancelUndelegateStake(): Promise<TxReceipt> {
async cancelUndelegateStakeRequest(): Promise<TxReceipt> {
await this.aud.hasPermissions(Permission.WRITE)
const info = await this.getContract().cancelUndelegateStake()
const info = await this.getContract().cancelUndelegateStakeRequest()
return info
}

Expand Down Expand Up @@ -335,12 +335,12 @@ export default class Delegate {
return info
}

async cancelRemoveDelegator(
async cancelRemoveDelegatorRequest(
serviceProvider: Address,
delegator: Address
): Promise<TxReceipt> {
await this.aud.hasPermissions(Permission.WRITE)
const info = await this.getContract().cancelRemoveDelegator(
const info = await this.getContract().cancelRemoveDelegatorRequest(
serviceProvider,
delegator
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ function cancelUndelegate(
try {
const wallet = getState().account.wallet
if (!wallet) throw new Error('Not signed in')

await aud.Delegate.cancelUndelegateStake()
await aud.Delegate.cancelUndelegateStakeRequest()
// Repull pending transactions
await dispatch(fetchPendingTransactions(wallet))

Expand All @@ -85,7 +84,7 @@ function cancelRemoveDelegator(
const accountWallet = getState().account.wallet
if (!accountWallet) throw new Error('Not signed in')
if (!wallet) throw new Error('Delegator wallet not provided')
await aud.Delegate.cancelRemoveDelegator(accountWallet, wallet)
await aud.Delegate.cancelRemoveDelegatorRequest(accountWallet, wallet)

// Repull pending transactions
await dispatch(fetchPendingTransactions(accountWallet))
Expand Down

0 comments on commit a17c671

Please sign in to comment.