Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
28be15ef
Unverified
Commit
28be15ef
authored
Nov 14, 2022
by
aballerr
Committed by
GitHub
Nov 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fixing color of buttons (#5179)
* fixing color states, price slider and navbar
parent
96dc7e09
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
55 additions
and
18 deletions
+55
-18
NftBalance.ts
src/graphql/data/nft/NftBalance.ts
+1
-1
Bag.tsx
src/nft/components/bag/Bag.tsx
+1
-0
BagFooter.css.ts
src/nft/components/bag/BagFooter.css.ts
+1
-1
utils.ts
src/nft/components/bag/profile/utils.ts
+1
-1
FilterButton.tsx
src/nft/components/collection/FilterButton.tsx
+1
-1
Filters.css.ts
src/nft/components/collection/Filters.css.ts
+2
-1
PriceRange.tsx
src/nft/components/collection/PriceRange.tsx
+4
-2
AssetPriceDetails.tsx
src/nft/components/details/AssetPriceDetails.tsx
+1
-1
ListPage.tsx
src/nft/components/profile/list/ListPage.tsx
+2
-2
EmptyWalletContent.tsx
src/nft/components/profile/view/EmptyWalletContent.tsx
+4
-1
ProfilePage.tsx
src/nft/components/profile/view/ProfilePage.tsx
+8
-1
common.css.ts
src/nft/css/common.css.ts
+0
-1
index.tsx
src/nft/pages/collection/index.tsx
+25
-1
sell.ts
src/nft/types/sell/sell.ts
+1
-1
listNfts.ts
src/nft/utils/listNfts.ts
+3
-3
No files found.
src/graphql/data/nft/NftBalance.ts
View file @
28be15ef
...
@@ -170,7 +170,7 @@ export function useNftBalanceQuery(
...
@@ -170,7 +170,7 @@ export function useNftBalanceQuery(
collectionIsVerified
:
asset
?.
collection
?.
isVerified
,
collectionIsVerified
:
asset
?.
collection
?.
isVerified
,
lastPrice
:
queryAsset
.
node
.
lastPrice
?.
value
,
lastPrice
:
queryAsset
.
node
.
lastPrice
?.
value
,
floorPrice
:
asset
?.
collection
?.
markets
?.[
0
]?.
floorPrice
?.
value
,
floorPrice
:
asset
?.
collection
?.
markets
?.[
0
]?.
floorPrice
?.
value
,
creatorPercentage
:
queryAsset
?.
node
?.
listingFees
?.[
0
]?.
basisPoints
??
0
/
10000
,
basisPoints
:
queryAsset
?.
node
?.
listingFees
?.[
0
]?.
basisPoints
??
0
/
10000
,
listing_date
:
asset
?.
listings
?.
edges
?.[
0
]?.
node
?.
createdAt
,
listing_date
:
asset
?.
listings
?.
edges
?.[
0
]?.
node
?.
createdAt
,
date_acquired
:
queryAsset
.
node
.
lastPrice
?.
timestamp
,
date_acquired
:
queryAsset
.
node
.
lastPrice
?.
timestamp
,
sellOrders
:
asset
?.
listings
?.
edges
.
map
((
edge
:
any
)
=>
edge
.
node
),
sellOrders
:
asset
?.
listings
?.
edges
.
map
((
edge
:
any
)
=>
edge
.
node
),
...
...
src/nft/components/bag/Bag.tsx
View file @
28be15ef
...
@@ -315,6 +315,7 @@ const Bag = () => {
...
@@ -315,6 +315,7 @@ const Bag = () => {
paddingY=
"10"
paddingY=
"10"
className=
{
`${buttonTextMedium} ${commonButtonStyles}`
}
className=
{
`${buttonTextMedium} ${commonButtonStyles}`
}
backgroundColor=
"accentAction"
backgroundColor=
"accentAction"
color=
"white"
textAlign=
"center"
textAlign=
"center"
onClick=
{
()
=>
{
onClick=
{
()
=>
{
isMobile
&&
toggleBag
()
isMobile
&&
toggleBag
()
...
...
src/nft/components/bag/BagFooter.css.ts
View file @
28be15ef
...
@@ -36,7 +36,7 @@ export const warningContainer = style([
...
@@ -36,7 +36,7 @@ export const warningContainer = style([
export
const
payButton
=
style
([
export
const
payButton
=
style
([
body
,
body
,
sprinkles
({
sprinkles
({
background
:
'
blue400
'
,
background
:
'
accentAction
'
,
border
:
'
none
'
,
border
:
'
none
'
,
borderRadius
:
'
12
'
,
borderRadius
:
'
12
'
,
paddingY
:
'
12
'
,
paddingY
:
'
12
'
,
...
...
src/nft/components/bag/profile/utils.ts
View file @
28be15ef
...
@@ -127,7 +127,7 @@ export const getTotalEthValue = (sellAssets: WalletAsset[]) => {
...
@@ -127,7 +127,7 @@ export const getTotalEthValue = (sellAssets: WalletAsset[]) => {
return
(
return
(
total
+
total
+
(
maxListing
.
price
??
0
)
-
(
maxListing
.
price
??
0
)
-
(
maxListing
.
price
??
0
)
*
(
maxListing
.
marketplace
.
fee
/
100
+
asset
.
creatorPercentage
)
(
maxListing
.
price
??
0
)
*
(
maxListing
.
marketplace
.
fee
/
100
+
asset
.
basisPoints
)
)
)
}
}
return
total
return
total
...
...
src/nft/components/collection/FilterButton.tsx
View file @
28be15ef
...
@@ -31,7 +31,7 @@ export const FilterButton = ({
...
@@ -31,7 +31,7 @@ export const FilterButton = ({
width=
{
isMobile
?
'
44
'
:
'
auto
'
}
width=
{
isMobile
?
'
44
'
:
'
auto
'
}
height=
"44"
height=
"44"
whiteSpace=
"nowrap"
whiteSpace=
"nowrap"
color=
"
textPrimary
"
color=
"
white
"
>
>
<
FilterIcon
/>
<
FilterIcon
/>
{
!
isMobile
?
(
{
!
isMobile
?
(
...
...
src/nft/components/collection/Filters.css.ts
View file @
28be15ef
...
@@ -8,7 +8,8 @@ export const container = style([
...
@@ -8,7 +8,8 @@ export const container = style([
paddingTop
:
'
4
'
,
paddingTop
:
'
4
'
,
}),
}),
{
{
width
:
'
300px
'
,
width
:
'
308px
'
,
paddingRight
:
'
8px
'
,
paddingBottom
:
'
96px
'
,
paddingBottom
:
'
96px
'
,
'
@media
'
:
{
'
@media
'
:
{
[
`(max-width:
${
breakpoints
.
sm
-
1
}
px)`
]:
{
[
`(max-width:
${
breakpoints
.
sm
-
1
}
px)`
]:
{
...
...
src/nft/components/collection/PriceRange.tsx
View file @
28be15ef
...
@@ -14,6 +14,7 @@ import { default as Slider } from 'rc-slider'
...
@@ -14,6 +14,7 @@ import { default as Slider } from 'rc-slider'
import
{
FocusEventHandler
,
FormEvent
,
useEffect
,
useState
}
from
'
react
'
import
{
FocusEventHandler
,
FormEvent
,
useEffect
,
useState
}
from
'
react
'
import
{
useLocation
}
from
'
react-router-dom
'
import
{
useLocation
}
from
'
react-router-dom
'
import
styled
,
{
useTheme
}
from
'
styled-components/macro
'
import
styled
,
{
useTheme
}
from
'
styled-components/macro
'
import
{
colorsDark
}
from
'
theme/colors
'
import
*
as
styles
from
'
./PriceRange.css
'
import
*
as
styles
from
'
./PriceRange.css
'
import
{
TraitsHeader
}
from
'
./TraitsHeader
'
import
{
TraitsHeader
}
from
'
./TraitsHeader
'
...
@@ -186,10 +187,11 @@ export const PriceRange = () => {
...
@@ -186,10 +187,11 @@ export const PriceRange = () => {
top
:
'
3px
'
,
top
:
'
3px
'
,
width
:
'
12px
'
,
width
:
'
12px
'
,
height
:
'
20px
'
,
height
:
'
20px
'
,
backgroundColor
:
`${theme.textPrimary}`
,
opacity
:
'
1
'
,
backgroundColor
:
`white`
,
borderRadius
:
'
4px
'
,
borderRadius
:
'
4px
'
,
border
:
'
none
'
,
border
:
'
none
'
,
boxShadow
:
`${theme.shallowShadow.slice(0, -1)}`
,
boxShadow
:
colorsDark
.
shallowShadow
.
slice
(
0
,
-
1
)
,
}
}
}
}
railStyle=
{
{
railStyle=
{
{
top
:
'
3px
'
,
top
:
'
3px
'
,
...
...
src/nft/components/details/AssetPriceDetails.tsx
View file @
28be15ef
...
@@ -356,7 +356,7 @@ export const AssetPriceDetails = ({ asset, collection }: AssetPriceDetailsProps)
...
@@ -356,7 +356,7 @@ export const AssetPriceDetails = ({ asset, collection }: AssetPriceDetailsProps)
}
}
}
}
}
}
>
>
<
SubHeader
lineHeight=
{
'
20px
'
}
>
<
SubHeader
color=
"white"
lineHeight=
{
'
20px
'
}
>
<
span
>
{
assetInBag
?
'
Remove
'
:
'
Buy Now
'
}
</
span
>
<
span
>
{
assetInBag
?
'
Remove
'
:
'
Buy Now
'
}
</
span
>
</
SubHeader
>
</
SubHeader
>
</
BuyNowButton
>
</
BuyNowButton
>
...
...
src/nft/components/profile/list/ListPage.tsx
View file @
28be15ef
...
@@ -595,7 +595,7 @@ const MarketplaceRow = ({
...
@@ -595,7 +595,7 @@ const MarketplaceRow = ({
const
marketplaceFee
=
selectedMarkets
.
length
>
0
?
maxMarketFee
(
selectedMarkets
)
:
0
const
marketplaceFee
=
selectedMarkets
.
length
>
0
?
maxMarketFee
(
selectedMarkets
)
:
0
const
price
=
showGlobalPrice
?
globalPrice
:
listPrice
const
price
=
showGlobalPrice
?
globalPrice
:
listPrice
const
feeInEth
=
price
&&
(
price
*
(
asset
.
creatorPercentage
*
100
+
marketplaceFee
))
/
100
const
feeInEth
=
price
&&
(
price
*
(
asset
.
basisPoints
*
0.01
+
marketplaceFee
))
/
100
const
userReceives
=
price
&&
feeInEth
&&
price
-
feeInEth
const
userReceives
=
price
&&
feeInEth
&&
price
-
feeInEth
const
profit
=
userReceives
&&
asset
.
lastPrice
&&
userReceives
-
asset
.
lastPrice
const
profit
=
userReceives
&&
asset
.
lastPrice
&&
userReceives
-
asset
.
lastPrice
const
profitPercent
=
profit
&&
asset
.
lastPrice
&&
Math
.
round
(
profit
&&
(
profit
/
asset
.
lastPrice
)
*
100
)
const
profitPercent
=
profit
&&
asset
.
lastPrice
&&
Math
.
round
(
profit
&&
(
profit
/
asset
.
lastPrice
)
*
100
)
...
@@ -714,7 +714,7 @@ const MarketplaceRow = ({
...
@@ -714,7 +714,7 @@ const MarketplaceRow = ({
</
Row
>
</
Row
>
<
Row
flex=
"1"
display=
{
{
sm
:
'
none
'
,
md
:
'
flex
'
}
}
>
<
Row
flex=
"1"
display=
{
{
sm
:
'
none
'
,
md
:
'
flex
'
}
}
>
<
Box
className=
{
body
}
color=
"textSecondary"
width=
"full"
textAlign=
"right"
>
<
Box
className=
{
body
}
color=
"textSecondary"
width=
"full"
textAlign=
"right"
>
{
(
asset
.
creatorPercentage
*
100
).
toFixed
(
1
)
}
%
{
(
asset
.
basisPoints
*
0.01
).
toFixed
(
1
)
}
%
</
Box
>
</
Box
>
</
Row
>
</
Row
>
<
Row
style=
{
{
flex
:
'
1.5
'
}
}
display=
{
{
sm
:
'
none
'
,
md
:
'
flex
'
}
}
>
<
Row
style=
{
{
flex
:
'
1.5
'
}
}
display=
{
{
sm
:
'
none
'
,
md
:
'
flex
'
}
}
>
...
...
src/nft/components/profile/view/EmptyWalletContent.tsx
View file @
28be15ef
...
@@ -23,7 +23,7 @@ const EmptyWalletText = styled.div`
...
@@ -23,7 +23,7 @@ const EmptyWalletText = styled.div`
const
ExploreNFTsButton
=
styled
.
button
`
const
ExploreNFTsButton
=
styled
.
button
`
background-color:
${({
theme
})
=>
theme
.
accentAction
}
;
background-color:
${({
theme
})
=>
theme
.
accentAction
}
;
padding: 10px 24px;
padding: 10px 24px;
color:
${({
theme
})
=>
theme
.
textPrimary
}
;
color:
${({
theme
})
=>
theme
.
white
}
;
width: min-content;
width: min-content;
border: none;
border: none;
outline: none;
outline: none;
...
@@ -31,6 +31,9 @@ const ExploreNFTsButton = styled.button`
...
@@ -31,6 +31,9 @@ const ExploreNFTsButton = styled.button`
white-space: nowrap;
white-space: nowrap;
cursor: pointer;
cursor: pointer;
margin-top: 20px;
margin-top: 20px;
font-weight: 500;
font-size: 16px;
line-height: 24px;
`
`
export
const
EmptyWalletContent
=
()
=>
{
export
const
EmptyWalletContent
=
()
=>
{
...
...
src/nft/components/profile/view/ProfilePage.tsx
View file @
28be15ef
...
@@ -44,12 +44,19 @@ const SellModeButton = styled.button<{ active: boolean }>`
...
@@ -44,12 +44,19 @@ const SellModeButton = styled.button<{ active: boolean }>`
gap: 8px;
gap: 8px;
cursor: pointer;
cursor: pointer;
background-color:
${({
theme
,
active
})
=>
(
active
?
theme
.
accentAction
:
theme
.
backgroundInteractive
)}
;
background-color:
${({
theme
,
active
})
=>
(
active
?
theme
.
accentAction
:
theme
.
backgroundInteractive
)}
;
color:
${({
theme
})
=>
theme
.
textPrimary
}
;
color:
${({
active
,
theme
})
=>
(
active
?
'
white
'
:
theme
.
textPrimary
)
}
;
border: none;
border: none;
outline: none;
outline: none;
&:hover {
&:hover {
background-color:
${({
theme
})
=>
theme
.
accentAction
}
;
background-color:
${({
theme
})
=>
theme
.
accentAction
}
;
color: white;
}
}
transition:
${({
theme
:
{
transition
:
{
duration
,
timing
},
},
})
=>
`
${
duration
.
fast
}
all
${
timing
.
ease
}
`
}
;
`
`
const
ProfilePageColumn
=
styled
(
Column
)
`
const
ProfilePageColumn
=
styled
(
Column
)
`
...
...
src/nft/css/common.css.ts
View file @
28be15ef
...
@@ -41,7 +41,6 @@ export const commonButtonStyles = style([
...
@@ -41,7 +41,6 @@ export const commonButtonStyles = style([
sprinkles
({
sprinkles
({
borderRadius
:
'
12
'
,
borderRadius
:
'
12
'
,
transition
:
'
250
'
,
transition
:
'
250
'
,
boxShadow
:
{
hover
:
'
elevation
'
},
}),
}),
{
{
border
:
'
none
'
,
border
:
'
none
'
,
...
...
src/nft/pages/collection/index.tsx
View file @
28be15ef
...
@@ -2,6 +2,11 @@ import { Trace } from '@uniswap/analytics'
...
@@ -2,6 +2,11 @@ import { Trace } from '@uniswap/analytics'
import
{
PageName
}
from
'
@uniswap/analytics-events
'
import
{
PageName
}
from
'
@uniswap/analytics-events
'
import
{
useWeb3React
}
from
'
@web3-react/core
'
import
{
useWeb3React
}
from
'
@web3-react/core
'
import
{
OpacityHoverState
}
from
'
components/Common
'
import
{
OpacityHoverState
}
from
'
components/Common
'
import
{
MAX_WIDTH_MEDIA_BREAKPOINT
,
MOBILE_MEDIA_BREAKPOINT
,
SMALL_MEDIA_BREAKPOINT
,
}
from
'
components/Tokens/constants
'
import
{
useLoadAssetsQuery
}
from
'
graphql/data/nft/Asset
'
import
{
useLoadAssetsQuery
}
from
'
graphql/data/nft/Asset
'
import
{
useCollectionQuery
,
useLoadCollectionQuery
}
from
'
graphql/data/nft/Collection
'
import
{
useCollectionQuery
,
useLoadCollectionQuery
}
from
'
graphql/data/nft/Collection
'
import
{
MobileHoverBag
}
from
'
nft/components/bag/MobileHoverBag
'
import
{
MobileHoverBag
}
from
'
nft/components/bag/MobileHoverBag
'
...
@@ -35,8 +40,27 @@ const MobileFilterHeader = styled(Row)`
...
@@ -35,8 +40,27 @@ const MobileFilterHeader = styled(Row)`
justify-content: space-between;
justify-content: space-between;
`
`
// Sticky navbar on light mode looks incorrect because the box shadows from assets overlap the the edges of the navbar.
// As a result it needs 14px padding on either side. These paddings are offset by 14px to account for this
const
CollectionDisplaySection
=
styled
(
Row
)
`
const
CollectionDisplaySection
=
styled
(
Row
)
`
${
styles
.
ScreenBreakpointsPaddings
}
@media screen and (min-width:
${
MAX_WIDTH_MEDIA_BREAKPOINT
}
) {
padding-left: 34px;
padding-right: 34px;
}
@media screen and (max-width:
${
MAX_WIDTH_MEDIA_BREAKPOINT
}
) {
padding-left: 26px;
padding-right: 26px;
}
@media screen and (max-width:
${
SMALL_MEDIA_BREAKPOINT
}
) {
padding-left: 4px;
padding-right: 4px;
}
@media screen and (max-width:
${
MOBILE_MEDIA_BREAKPOINT
}
) {
padding-left: 16px;
}
align-items: flex-start;
align-items: flex-start;
position: relative;
position: relative;
`
`
...
...
src/nft/types/sell/sell.ts
View file @
28be15ef
...
@@ -62,7 +62,7 @@ export interface WalletAsset {
...
@@ -62,7 +62,7 @@ export interface WalletAsset {
collectionIsVerified
:
boolean
collectionIsVerified
:
boolean
lastPrice
:
number
lastPrice
:
number
floorPrice
:
number
floorPrice
:
number
creatorPercentage
:
number
basisPoints
:
number
listing_date
:
string
listing_date
:
string
date_acquired
:
string
date_acquired
:
string
sellOrders
:
SellOrder
[]
sellOrders
:
SellOrder
[]
...
...
src/nft/utils/listNfts.ts
View file @
28be15ef
...
@@ -55,7 +55,7 @@ const getConsiderationItems = (
...
@@ -55,7 +55,7 @@ const getConsiderationItems = (
creatorFee
?:
ConsiderationInputItem
creatorFee
?:
ConsiderationInputItem
}
=>
{
}
=>
{
const
openSeaBasisPoints
=
OPENSEA_DEFAULT_FEE
*
INVERSE_BASIS_POINTS
const
openSeaBasisPoints
=
OPENSEA_DEFAULT_FEE
*
INVERSE_BASIS_POINTS
const
creatorFeeBasisPoints
=
asset
.
creatorPercentage
*
INVERSE_BASIS_POINTS
const
creatorFeeBasisPoints
=
asset
.
basisPoints
*
INVERSE_BASIS_POINTS
const
sellerBasisPoints
=
INVERSE_BASIS_POINTS
-
openSeaBasisPoints
-
creatorFeeBasisPoints
const
sellerBasisPoints
=
INVERSE_BASIS_POINTS
-
openSeaBasisPoints
-
creatorFeeBasisPoints
const
openseaFee
=
price
.
mul
(
BigNumber
.
from
(
openSeaBasisPoints
)).
div
(
BigNumber
.
from
(
INVERSE_BASIS_POINTS
)).
toString
()
const
openseaFee
=
price
.
mul
(
BigNumber
.
from
(
openSeaBasisPoints
)).
div
(
BigNumber
.
from
(
INVERSE_BASIS_POINTS
)).
toString
()
...
@@ -187,7 +187,7 @@ export async function signListing(
...
@@ -187,7 +187,7 @@ export async function signListing(
endTime
:
BigNumber
.
from
(
asset
.
expirationTime
),
endTime
:
BigNumber
.
from
(
asset
.
expirationTime
),
// minimum ratio to be received by the user (per 10000)
// minimum ratio to be received by the user (per 10000)
minPercentageToAsk
:
BigNumber
.
from
(
10000
)
minPercentageToAsk
:
BigNumber
.
from
(
10000
)
.
sub
(
BigNumber
.
from
(
200
).
add
(
BigNumber
.
from
(
asset
.
creatorPercentage
*
10000
)))
.
sub
(
BigNumber
.
from
(
200
).
add
(
BigNumber
.
from
(
asset
.
basisPoints
*
10000
)))
.
toNumber
(),
.
toNumber
(),
// params (e.g., price, target account for private sale)
// params (e.g., price, target account for private sale)
params
:
[],
params
:
[],
...
@@ -214,7 +214,7 @@ export async function signListing(
...
@@ -214,7 +214,7 @@ export async function signListing(
price
:
parseEther
(
listingPrice
.
toString
()).
toString
(),
price
:
parseEther
(
listingPrice
.
toString
()).
toString
(),
startTime
:
currentTime
,
startTime
:
currentTime
,
endTime
:
asset
.
expirationTime
,
endTime
:
asset
.
expirationTime
,
minPercentageToAsk
:
10000
-
(
200
+
asset
.
creatorPercentage
*
10000
),
minPercentageToAsk
:
10000
-
(
200
+
asset
.
basisPoints
*
10000
),
params
:
[],
params
:
[],
}
}
const
res
=
await
createLooksRareOrder
(
payload
)
const
res
=
await
createLooksRareOrder
(
payload
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment