Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
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
exchain
nebula
Commits
4f5cc382
Commit
4f5cc382
authored
Mar 01, 2023
by
Will Cory
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hexlify
parent
8c7d43f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
readAttestation.spec.ts
packages/atst/src/lib/readAttestation.spec.ts
+0
-1
stringifyAttestationBytes.ts
packages/atst/src/lib/stringifyAttestationBytes.ts
+7
-2
No files found.
packages/atst/src/lib/readAttestation.spec.ts
View file @
4f5cc382
...
@@ -39,4 +39,3 @@ describe(readAttestation.name, () => {
...
@@ -39,4 +39,3 @@ describe(readAttestation.name, () => {
)
)
})
})
})
})
packages/atst/src/lib/stringifyAttestationBytes.ts
View file @
4f5cc382
import
{
Address
}
from
'
@wagmi/core
'
import
{
Address
}
from
'
@wagmi/core
'
import
{
BigNumber
}
from
'
ethers
'
import
{
BigNumber
}
from
'
ethers
'
import
{
isAddress
,
isHexString
,
toUtf8Bytes
}
from
'
ethers/lib/utils.js
'
import
{
hexlify
,
isAddress
,
isHexString
,
toUtf8Bytes
,
}
from
'
ethers/lib/utils.js
'
import
{
WagmiBytes
}
from
'
../types/WagmiBytes
'
import
{
WagmiBytes
}
from
'
../types/WagmiBytes
'
...
@@ -24,7 +29,7 @@ export const stringifyAttestationBytes = (
...
@@ -24,7 +29,7 @@ export const stringifyAttestationBytes = (
return
bytes
as
WagmiBytes
return
bytes
as
WagmiBytes
}
}
if
(
typeof
bytes
===
'
string
'
)
{
if
(
typeof
bytes
===
'
string
'
)
{
return
BigNumber
.
from
(
toUtf8Bytes
(
bytes
)).
toHexString
(
)
as
WagmiBytes
return
hexlify
(
toUtf8Bytes
(
bytes
)
)
as
WagmiBytes
}
}
throw
new
Error
(
`unrecognized bytes type
${
bytes
satisfies
never
}
`
)
throw
new
Error
(
`unrecognized bytes type
${
bytes
satisfies
never
}
`
)
}
}
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