Skip to content

Commit

Permalink
Bump dependencies (#883)
Browse files Browse the repository at this point in the history
* feat: bump RDT, add stokenet to dapps-dropdown

* fix prettier
  • Loading branch information
dawidsowardx authored Jan 4, 2024
1 parent 765224d commit af65ff5
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 37 deletions.
2 changes: 1 addition & 1 deletion apps/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@fontsource/public-sans": "^4.5.12",
"@radixdlt/dapps-dropdown": "1.0.1",
"@radixdlt/dapps-dropdown": "1.0.2",
"@mui/icons-material": "^5.11.16",
"@mui/joy": "^5.0.0-alpha.76",
"@mui/material": "^5.12.1",
Expand Down
11 changes: 8 additions & 3 deletions apps/sandbox/src/layouts/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import MenuIcon from '@mui/icons-material/Menu'
import Select from '@mui/joy/Select'
import Option from '@mui/joy/Option'
import { setNetworkId, useNetworkId } from '../network/state'
import { RadixNetworkConfig } from '@radixdlt/babylon-gateway-api-sdk'
import {
RadixNetworkConfig,
RadixNetwork
} from '@radixdlt/babylon-gateway-api-sdk'
import { IS_PUBLIC } from '../config'

declare global {
Expand All @@ -22,7 +25,7 @@ declare global {
'radix-dapps-dropdown': React.DetailedHTMLProps<
React.HTMLAttributes<HTMLElement>,
HTMLElement
>
> & { networkName: string }
}
}
}
Expand All @@ -33,6 +36,8 @@ export const Header = ({
setDrawerOpen: (value: boolean) => void
}) => {
const networkId = useNetworkId()
const networkName =
networkId === RadixNetwork.Mainnet ? 'Mainnet' : 'Stokenet'
return (
<Layout.Header>
<Box
Expand Down Expand Up @@ -69,7 +74,7 @@ export const Header = ({
gap: 1.5
}}
>
<radix-dapps-dropdown></radix-dapps-dropdown>
<radix-dapps-dropdown networkName={networkName}></radix-dapps-dropdown>
<Select
value={networkId}
onChange={(_, value) => {
Expand Down
26 changes: 13 additions & 13 deletions 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/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"@floating-ui/dom": "^1.5.3",
"@radixdlt/babylon-gateway-api-sdk": "^1.2.0",
"@radixdlt/radix-dapp-toolkit": "^1.3.1",
"@radixdlt/radix-dapp-toolkit": "^1.4.1",
"@radixdlt/radix-engine-toolkit": "1.0.0",
"@radixdlt/rola": "^1.0.2",
"dayjs": "^1.11.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"dependencies": {
"@bulatdashiev/svelte-slider": "^1.0.3",
"@prisma/client": "^4.15.0",
"@radixdlt/dapps-dropdown": "1.0.1",
"@radixdlt/dapps-dropdown": "1.0.2",
"@rgossiaux/svelte-headlessui": "^1.0.2",
"@vitest/coverage-v8": "^0.32.0",
"bignumber.js": "^9.1.0",
Expand Down
34 changes: 17 additions & 17 deletions packages/ui/src/api/_deprecated/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,30 +111,30 @@ export type AuthInfo = {

export const isAllowed =
(authInfo: AuthInfo) =>
(rule: AuthInfo['rules'][keyof AuthInfo['rules']]) => {
if (rule.rule.type === 'Protected') {
return 'by-someone'
}

if (rule.rule.type === 'AllowAll') {
return 'by-anyone'
}
(rule: AuthInfo['rules'][keyof AuthInfo['rules']]) => {
if (rule.rule.type === 'Protected') {
return 'by-someone'
}

if (rule.rule.type === 'Owner') {
const owner = authInfo.owner
if (rule.rule.type === 'AllowAll') {
return 'by-anyone'
}

if (owner.type == 'Protected') {
return 'by-someone'
}
if (rule.rule.type === 'Owner') {
const owner = authInfo.owner

if (owner.type === 'AllowAll') {
return 'by-anyone'
}
if (owner.type == 'Protected') {
return 'by-someone'
}

return 'by-no-one'
if (owner.type === 'AllowAll') {
return 'by-anyone'
}
}

return 'by-no-one'
}

const getEntryInfo = (entry: ComponentEntityRoleAssignmentEntry) => {
const assignment = entry.assignment
const rule = assignment.explicit_rule as AccessRule | undefined
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<script lang="ts">
import { RadixNetwork } from '@common/gateway-sdk'
import { CURRENT_NETWORK } from '@networks'
import '@radixdlt/dapps-dropdown'
const networkName =
CURRENT_NETWORK.id === RadixNetwork.Mainnet ? 'Mainnet' : 'Stokenet'
</script>

<radix-dapps-dropdown />
<radix-dapps-dropdown {networkName} />

0 comments on commit af65ff5

Please sign in to comment.