-
-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11239 from hassnian/issue-11237
fix: Misleading `Withdraw Amount` wording in Offers
- Loading branch information
Showing
11 changed files
with
72 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { ApiPromise } from '@polkadot/api' | ||
import type { ActionCancelOffer } from './types' | ||
import { getOfferCollectionId } from './transactionOffer' | ||
|
||
async function execCancelOfferAssetHub(item: ActionCancelOffer, api: ApiPromise, executeTransaction) { | ||
executeTransaction({ | ||
cb: api.tx.nfts.cancelSwap, | ||
arg: [getOfferCollectionId(item.urlPrefix), Number(item.offeredId)], | ||
successMessage: item.successMessage, | ||
errorMessage: item.errorMessage, | ||
}) | ||
} | ||
|
||
export async function execCancelOffer(item: ActionCancelOffer, api, executeTransaction) { | ||
if (isAssetHub(item.urlPrefix)) { | ||
await execCancelOfferAssetHub(item, api, executeTransaction) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { ApiPromise } from '@polkadot/api' | ||
import type { ActionCancelSwap } from './types' | ||
|
||
async function execCancelSwapAssetHub(item: ActionCancelSwap, api: ApiPromise, executeTransaction) { | ||
executeTransaction({ | ||
cb: api.tx.nfts.cancelSwap, | ||
arg: [Number(item.offeredCollectionId), Number(item.offeredId)], | ||
successMessage: item.successMessage, | ||
errorMessage: item.errorMessage, | ||
}) | ||
} | ||
|
||
export async function execCancelSwap(item: ActionCancelSwap, api: ApiPromise, executeTransaction) { | ||
if (isAssetHub(item.urlPrefix)) { | ||
await execCancelSwapAssetHub(item, api, executeTransaction) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters