-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: bumped fuels
version to 0.98.0
#1766
Changes from 2 commits
7b3a0d2
dc23d09
bdbf7f7
6ca4222
fe5d845
4162206
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
channel = "testnet" | ||
|
||
[components] | ||
fuel-core = "0.38.0" | ||
forc = "0.65.2" | ||
fuel-core = "0.40.2" | ||
forc = "0.66.5" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import type { ThemeUtilsCSS } from '@fuel-ui/css'; | ||
import { cssObj } from '@fuel-ui/css'; | ||
import { Box, Copyable, Icon, IconButton, Text } from '@fuel-ui/react'; | ||
import { | ||
Address, | ||
type B256Address, | ||
type Bech32Address, | ||
type ChecksumAddress, | ||
} from 'fuels'; | ||
import { Address, type B256Address, type ChecksumAddress } from 'fuels'; | ||
import { useMemo } from 'react'; | ||
import { shortAddress } from '~/systems/Core'; | ||
import { useExplorerLink } from '../../hooks/useExplorerLink'; | ||
|
||
export type AddressProps = { | ||
address: ChecksumAddress | Bech32Address | B256Address; | ||
address: ChecksumAddress | B256Address; | ||
canOpenExplorer?: boolean; | ||
css?: ThemeUtilsCSS; | ||
isContract?: boolean; | ||
|
@@ -27,7 +22,7 @@ | |
const account = useMemo<string>(() => { | ||
if (!address) return ''; | ||
if (isContract) return Address.fromDynamicInput(address).toB256(); | ||
return Address.fromDynamicInput(address).toString(); | ||
Check warning on line 25 in packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx GitHub Actions / TestRETRY 1: AccountList › a11y
Check warning on line 25 in packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx GitHub Actions / TestRETRY 3: AccountList › a11y
Check warning on line 25 in packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx GitHub Actions / TestRETRY 5: AccountList › a11y
Check failure on line 25 in packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx GitHub Actions / TestAccountList › a11y
Check warning on line 25 in packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx GitHub Actions / TestRETRY 1: AccountList › should render two accounts
Check warning on line 25 in packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx GitHub Actions / TestRETRY 3: AccountList › should render two accounts
Check failure on line 25 in packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx GitHub Actions / TestAccountList › should render two accounts
Check failure on line 25 in packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx GitHub Actions / TestAccountList › should show hidden accounts when click on toggle button
|
||
}, [isContract, address]); | ||
|
||
const { openExplorer, href } = useExplorerLink(account); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import { cssObj } from '@fuel-ui/css'; | |
import { Alert, Box, Form, Input, Text } from '@fuel-ui/react'; | ||
import { motion } from 'framer-motion'; | ||
import { type BN, bn } from 'fuels'; | ||
import { useEffect, useMemo, useRef, useState } from 'react'; | ||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; | ||
import { AssetSelect } from '~/systems/Asset'; | ||
import { | ||
ControlledField, | ||
|
@@ -35,6 +35,7 @@ export function SendSelect({ | |
provider, | ||
}: SendSelectProps) { | ||
const [watchMax, setWatchMax] = useState(false); | ||
const [baseAssetId, setBaseAssetId] = useState<string | null>(null); | ||
const isAmountFocused = useRef<boolean>(false); | ||
const baseFeeRef = useRef<BN | null>(baseFee); | ||
const tipRef = useRef<BN>(tip); | ||
|
@@ -49,17 +50,21 @@ export function SendSelect({ | |
name: 'asset', | ||
}); | ||
|
||
useEffect(() => { | ||
provider | ||
?.getBaseAssetId() | ||
.then((id) => setBaseAssetId(id)) | ||
.catch((e) => console.error(e)); | ||
}, [provider]); | ||
|
||
const decimals = useMemo(() => { | ||
const selectedAsset = balances?.find((a) => a.asset?.assetId === assetId); | ||
return selectedAsset?.asset?.decimals; | ||
}, [assetId, balances]); | ||
|
||
const isSendingBaseAssetId = useMemo(() => { | ||
return ( | ||
assetId && | ||
provider?.getBaseAssetId().toLowerCase() === assetId.toLowerCase() | ||
); | ||
}, [provider, assetId]); | ||
return assetId && baseAssetId?.toLowerCase() === assetId.toLowerCase(); | ||
}, [baseAssetId, assetId]); | ||
Comment on lines
65
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Wasn't 100% on this change, would be good to validate this. |
||
|
||
useEffect(() => { | ||
if ( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have removed the
bech32
address.From this comment, it appears we store
bech32
in the database? Would be good to validate this.