Skip to content

Commit

Permalink
Minor changes (#108)
Browse files Browse the repository at this point in the history
* Make toAddressString() shorter

* Change the description

* Fix quotes
  • Loading branch information
siegfried authored Nov 2, 2022
1 parent 51dd496 commit 47aefe0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions src/cardano/multiplatform-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ const isAddressNetworkCorrect = (config: Config, address: Address): boolean => {
return config.isMainnet ? networkId === 1 : networkId === 0
}

const toAddressString = (address: Address): string => {
const byron = address.as_byron()
if (byron) return byron.to_base58()
return address.to_bech32()
}
const toAddressString = (address: Address): string => address.as_byron()?.to_base58() ?? address.to_bech32()

type Result<T> =
| { isOk: true, data: T }
Expand Down
8 changes: 4 additions & 4 deletions src/pages/treasuries/[base64CBOR]/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,10 @@ const GetUTxOsToSpend: FC<{
<div className='space-y-2'>
<Hero>
<h1 className='font-semibold text-lg'>Create Transaction</h1>
<article>
<p>Due to the native assets, you should have <strong><ADAAmount lovelace={minLovelace} /></strong> at least in your treasury in order to create transactions properly.</p>
<p>You can send all assets to other by removing all the recipients.</p>
</article>
<div>
<p>Due to the native assets, you should always have at least <strong><ADAAmount lovelace={minLovelace} /></strong> in your treasury to create transactions properly.</p>
<p>You can send all assets to a different address by modifying the &ldquo;change&rdquo; recipient.</p>
</div>
</Hero>
<NativeScriptInfoViewer
className='border-t-4 border-sky-700 bg-white rounded shadow overflow-hidden p-4 space-y-1'
Expand Down

0 comments on commit 47aefe0

Please sign in to comment.