Skip to content

Commit

Permalink
HF 30 - NFT fixes - small, but significant...
Browse files Browse the repository at this point in the history
  • Loading branch information
1aerostorm committed Jun 2, 2024
1 parent 4cee597 commit f6e44a1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/components/cards/TransferHistoryRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ class TransferHistoryRow extends React.Component {
linkExternal3 = true
description_end = tt('transferhistoryrow_jsx.for')
description_end += Asset(data.price).floatString
if (!data.actor) {
description_end += tt('transferhistoryrow_jsx.via_auction')
}
} else if (type === 'nft_buy') {
if (!data.order_id) {
link = data.buyer
Expand Down
3 changes: 2 additions & 1 deletion app/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,8 @@
"nft_issued_for": " for ",
"nft_issued_cost": "issue cost is ",
"nft_sell": " placed order of selling ",
"sold": " sold "
"sold": " sold ",
"via_auction": " (via auction)"
},
"savingswithdrawhistory_jsx": {
"cancel_this_withdraw_request": "Cancel this withdraw request?",
Expand Down
3 changes: 2 additions & 1 deletion app/locales/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,8 @@
"nft_issued_for": " для ",
"nft_issued_cost": "за выпуск списано ",
"nft_sell": " выставил на продажу ",
"sold": " продал "
"sold": " продал ",
"via_auction": " (на аукционе)"
},
"user_profile": {
"unknown_account": "Неизвестный аккаунт",
Expand Down
16 changes: 15 additions & 1 deletion app/redux/FetchDataSaga.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export function* fetchState(location_change_action) {
state.witnesses[uname] = yield call([api, api.getWitnessByAccountAsync], uname)
break
case 'nft-history':
const nftHistory = yield call([api, api.getAccountHistoryAsync], uname, -1, 1000, {select_ops: ['nft_token', 'nft_transfer', 'nft_buy', 'nft_cancel_order', 'nft_token_sold']})
const nftHistory = yield call([api, api.getAccountHistoryAsync], uname, -1, 1000, {select_ops: ['nft_token', 'nft_transfer', 'nft_buy', /*'nft_cancel_order',*/ 'nft_token_sold']})
account.nft_history = []

state.cprops = yield call([api, api.getChainPropertiesAsync])
Expand Down Expand Up @@ -745,6 +745,20 @@ export function* fetchNftCollectionTokens({ payload: { collectionName, start_tok
next_from = nft_tokens.pop().token_id
}

const select_token_ids = []
const tokens_by_id = {}

try {
for (const no of nft_tokens) {
select_token_ids.push(no.token_id)
tokens_by_id[no.token_id] = no
}
} catch (err) {
console.error(err)
}

yield fillNftTokenOrders(select_token_ids, tokens_by_id)

let nft_assets

try {
Expand Down

0 comments on commit f6e44a1

Please sign in to comment.