Skip to content

Commit 4746ce3

Browse files
author
crzypatchwork
committed
undefined? creator fix
1 parent 4df8a91 commit 4746ce3

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

src/components/item-info/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ export const ItemInfo = ({
172172
<div className={styles.inline}>
173173
<Button
174174
to={
175-
`/tz/${creator.address}`
175+
`/tz/${creator?.address}`
176176
}
177177
>
178-
{creator.name ? (
179-
<Primary>{encodeURI(creator.name)}</Primary>
178+
{creator?.name ? (
179+
<Primary>{encodeURI(creator?.name)}</Primary>
180180
) : (
181-
<Primary>{walletPreview(creator.address)}</Primary>
181+
<Primary>{walletPreview(creator?.address)}</Primary>
182182
)}
183183
</Button>
184184
</div>

src/components/owner-list/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ export const OwnerList = ({ owners, creator_id, acc, swaps }) => {
3434
))}
3535
{
3636
swaps.map((e, index) => {
37-
if (acc) {
38-
if (acc && !acc.address == e.creator_id) {
37+
3938
return (
4039
<div>
4140
<div key={`${e.id}-${index}`} className={styles.swap}>
@@ -48,12 +47,6 @@ export const OwnerList = ({ owners, creator_id, acc, swaps }) => {
4847
</div>
4948
</div>
5049
)
51-
} else {
52-
return undefined
53-
}
54-
} else {
55-
return undefined
56-
}
5750
})
5851
}
5952
</div>

src/pages/objkt-display/tabs/swap.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Loading } from '../../../components/loading'
66
import { Input } from '../../../components/input'
77
import { Button, Curate, Purchase } from '../../../components/button'
88
import { stubFalse } from 'lodash'
9-
export const Swap = ({ total_amount, owners, creator, royalties, token_info, address }) => {
9+
export const Swap = ({ total_amount, owners, creator, royalties, token_info, address, restricted }) => {
1010
const { id } = useParams()
1111
const { swap, swapv2, acc, swap_hDAO, progress, setProgress, message, setMessage } = useContext(HicetnuncContext)
1212
const [amount, setAmount] = useState()
@@ -47,8 +47,8 @@ export const Swap = ({ total_amount, owners, creator, royalties, token_info, add
4747
console.log(acc.address, royalties, parseFloat(price) * 1000000, id, creator.address, parseFloat(amount))
4848

4949
if (currency === 'tez') {
50-
swapv2(acc.address, royalties, parseFloat(price) * 1000000, id, creator.address, parseFloat(amount))
51-
//swap(parseFloat(amount), id, parseFloat(price) * 1000000)
50+
//swapv2(acc.address, royalties, parseFloat(price) * 1000000, id, creator.address, parseFloat(amount))
51+
swap(parseFloat(amount), id, parseFloat(price) * 1000000)
5252
.then((e) => {
5353
// when taquito returns a success/fail message
5454
//setProgress(false)

0 commit comments

Comments
 (0)