Skip to content
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

v0.5.0 #64

Merged
merged 52 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9a1bfc9
docs: :memo: updated contribution doc
a0ngo Dec 14, 2023
2227ee2
fix: csv macro protection
a0ngo Dec 17, 2023
9d475e4
chore: bump versions
a0ngo Dec 17, 2023
94cbc7a
chore: bump electorn version
a0ngo Dec 18, 2023
2f33060
chore: bump zod version
a0ngo Dec 18, 2023
02a49fa
chore: bump graphql version
a0ngo Dec 18, 2023
c7040b2
chore: bump cosmjs/stargate version
a0ngo Dec 18, 2023
aa8b330
refactor(@fireblocks/recovery-shared): :recycle: changed variable names
a0ngo Dec 18, 2023
dcc72c1
refactor(@fireblocks/asset-config): :recycle: change utxo asset confi…
a0ngo Dec 24, 2023
3dcbed6
fix(@fireblocks/recovery-shared): :bug: fixed address validation for …
a0ngo Dec 24, 2023
d73e918
refactor(@fireblocks/recovery-utility): :recycle: refactor derivation…
a0ngo Dec 24, 2023
35475c9
refactor(@fireblocks/recovery-relay): :recycle: refactored btc-like i…
a0ngo Dec 24, 2023
6f510c4
feat(@fireblocks/recovery-utility): :sparkles: added DASH signing sup…
a0ngo Dec 26, 2023
1799eaa
fix(@fireblocks/recovery-relay): :bug: fetched UTXOs are now only con…
a0ngo Dec 26, 2023
a483a33
chore: bump nextron version for `yarn dev`
a0ngo Dec 18, 2023
5413a9a
fix(@fireblocks/recovery-utility): :bug: consecutive withdrawals don'…
a0ngo Dec 18, 2023
b416139
fix(@fireblocks/recovery-relay): :lipstick: withdrawal dialog reflect…
a0ngo Dec 18, 2023
15efb0e
fix(@fireblocks/recovery-relay): :bug: fixed relay failure due to big…
a0ngo Dec 18, 2023
1b09759
fix(@fireblocks/recovery-shared): :bug: fixed explorer URL for avax t…
a0ngo Dec 18, 2023
e2a1c0d
test(@fireblocks/e2e-tests): :white_check_mark: fixed test detection …
a0ngo Dec 18, 2023
836f65d
fix(@fireblocks/recovery-relay): :bug: consecutive EVM withdrawals fa…
a0ngo Dec 18, 2023
29ef3de
refactor(@fireblocks/e2e-tests): :recycle: allow e2e tests to send to…
a0ngo Dec 19, 2023
599c650
fix(@fireblocks/recovery-relay): :bug: xrp don't wait on tx to be con…
a0ngo Dec 19, 2023
9923558
Update xrp relay broadcast
a0ngo Dec 27, 2023
4b2491c
chore(@fireblocks/recovery-relay): :thread: web request goes through …
a0ngo Jan 1, 2024
eedf26c
fix(@fireblocks/recovery-relay): :bug: added bsv broadcast function a…
a0ngo Jan 1, 2024
869d183
fix(@fireblocks/recovery-relay): :bug: fixed broadcast override for b…
a0ngo Jan 1, 2024
d74fc9d
chore(@fireblocks/recovery-relay): :sparkles: allow btc relay wallet …
a0ngo Jan 1, 2024
bf14769
feat(@fireblocks/recovery-utility): :sparkles: implemented BSV tx cre…
a0ngo Jan 1, 2024
5d2f023
chore: :arrow_up: update yarn.lock
a0ngo Jan 1, 2024
89ceb20
fix(@fireblocks/asset-config): :bug: updated doge explorer link
a0ngo Jan 4, 2024
aae245c
fix(@fireblocks/recovery-relay): :bug: show broadcast error in case o…
a0ngo Jan 4, 2024
8930830
chore(@fireblocks/recovery-relay): :recycle: refactored doge relay wa…
a0ngo Jan 4, 2024
23b495c
fix(@fireblocks/recovery-relay): :bug: fixed broadcast failure due to…
a0ngo Jan 4, 2024
d6c97e2
feat(@fireblocks/recovery-utility): :sparkles: implemented doge coin …
a0ngo Jan 4, 2024
1d4437d
feat(@fireblocks/recovery-relay): :sparkles: added update alert
a0ngo Jan 4, 2024
ece816c
fix: correct LTC wallet derivation and tx signing
ArielSir-fb Jan 7, 2024
8561d07
feat(@fireblocks/recovery-utility): :sparkles: added ability to provi…
a0ngo Jan 8, 2024
8e0d2dc
chore(@fireblocks/recovery-utility): :mute: removed log flooding print
a0ngo Jan 8, 2024
6aa1256
chore: update beta warning
a0ngo Jan 8, 2024
0c07fd5
fix(@fireblocks/recovery-shared): :bug: do not load csv if asset is m…
a0ngo Jan 8, 2024
0576e22
WIP: implement ZEC (#55)
dainkang1 Jan 10, 2024
2eeae2b
fix(@fireblocks/recovery-utility): :bug: fixed linux relaunch failure
a0ngo Jan 18, 2024
a966792
chore(@fireblocks/recovery-utility): :recycle: export ncw master key …
a0ngo Jan 11, 2024
9670df7
feat(@fireblocks/recovery-utility): :sparkles: added NCW recovery fun…
a0ngo Jan 11, 2024
cf0b421
test(@fireblocks/recovery-utility): :white_check_mark: added NCW tests
a0ngo Jan 11, 2024
507aa3d
feat(@fireblocks/recovery-utility): :sparkles: allow to only recover …
a0ngo Jan 11, 2024
67953e1
refactor(@fireblocks/recovery-utility): :recycle: refactor ncw naming…
a0ngo Jan 18, 2024
b57d222
fix(@fireblocks/recovery-relay): :bug: added zec tx generation code b…
a0ngo Jan 25, 2024
bc5e434
Merge branch 'v0.5.0-chain-impls' into v0.5.0
a0ngo Jan 25, 2024
2898f0b
chore: :bookmark: bump versions
a0ngo Jan 25, 2024
73eacb5
Merge branch 'main' into v0.5.0
a0ngo Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/breezy-buckets-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@fireblocks/extended-key-recovery': minor
'@fireblocks/recovery-shared': minor
---

allow manual input of xprv and fprv
5 changes: 5 additions & 0 deletions .changeset/clever-donuts-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

fixed btc relay wallet broadcast failure
5 changes: 5 additions & 0 deletions .changeset/fair-actors-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

added alert for new version availability
5 changes: 5 additions & 0 deletions .changeset/few-squids-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-utility': minor
---

Implemented BSV transaction creation, serialization and signing
5 changes: 5 additions & 0 deletions .changeset/fifty-actors-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

reflect broadcast error in case occurred
5 changes: 5 additions & 0 deletions .changeset/forty-walls-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-shared': minor
---

prevent loading csv if asset is missing derivation path
5 changes: 5 additions & 0 deletions .changeset/friendly-lobsters-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/e2e-tests': minor
---

tests now take into account broadcast errors
5 changes: 5 additions & 0 deletions .changeset/friendly-rings-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/asset-config': minor
---

fixed AVAX testnet explorer URL
5 changes: 5 additions & 0 deletions .changeset/gold-fishes-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-shared': minor
---

fixed address validation for testnet assets
5 changes: 5 additions & 0 deletions .changeset/gold-spies-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-shared': minor
---

changed variable names
5 changes: 5 additions & 0 deletions .changeset/hip-keys-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

refactored btc-like information query code on relay
5 changes: 5 additions & 0 deletions .changeset/hot-dolls-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-utility': minor
---

implemented doge tx signing
7 changes: 7 additions & 0 deletions .changeset/kind-pigs-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@fireblocks/recovery-utility': minor
'@fireblocks/recovery-relay': minor
'@fireblocks/recovery-shared': minor
---

fix: consecutive withdrawals don't work
5 changes: 5 additions & 0 deletions .changeset/light-adults-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

allowed btc relay utils to pipe web req through main proc
5 changes: 5 additions & 0 deletions .changeset/long-crabs-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-utility': minor
---

implemented DASH signing
5 changes: 5 additions & 0 deletions .changeset/many-days-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

fixed fetching UTXO to only confirmed ones
5 changes: 5 additions & 0 deletions .changeset/many-falcons-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/asset-config': minor
---

updated doge explorer link
5 changes: 5 additions & 0 deletions .changeset/new-cooks-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/wallet-derivation': minor
---

added NCW tests
5 changes: 5 additions & 0 deletions .changeset/nine-pans-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-utility': minor
---

fix linux appimage relaunch failure
5 changes: 5 additions & 0 deletions .changeset/ninety-teachers-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

refactored doge relay wallet
5 changes: 5 additions & 0 deletions .changeset/old-months-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

added bsv broadcast function and cleanup
7 changes: 7 additions & 0 deletions .changeset/plenty-numbers-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@fireblocks/wallet-derivation': minor
'@fireblocks/recovery-utility': minor
'@fireblocks/recovery-shared': minor
---

added ncw recovery functionality
5 changes: 5 additions & 0 deletions .changeset/proud-coins-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

ripple tx broadcast and result without waiting for confirmation
6 changes: 6 additions & 0 deletions .changeset/quiet-candles-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@fireblocks/recovery-relay': minor
'@fireblocks/recovery-shared': minor
---

fixed EVM provider caching and funds broadcast error
7 changes: 7 additions & 0 deletions .changeset/rare-snakes-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@fireblocks/extended-key-recovery': minor
'@fireblocks/recovery-utility': minor
'@fireblocks/recovery-shared': minor
---

added functionality to only recover NCW keys
6 changes: 6 additions & 0 deletions .changeset/red-flies-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@fireblocks/wallet-derivation': minor
'@fireblocks/recovery-utility': minor
---

refactor derivation and signing code
8 changes: 8 additions & 0 deletions .changeset/rotten-islands-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@fireblocks/extended-key-recovery': minor
'@fireblocks/wallet-derivation': minor
'@fireblocks/recovery-utility': minor
'@fireblocks/recovery-shared': minor
---

update type naming
5 changes: 5 additions & 0 deletions .changeset/seven-impalas-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/asset-config': minor
---

Disabled transfer for testnet assets and re-enabled transfer for UTXO assets
5 changes: 5 additions & 0 deletions .changeset/strange-clouds-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

updated withdrawal modal to reflect errors
6 changes: 6 additions & 0 deletions .changeset/strange-kangaroos-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@fireblocks/recovery-utility': minor
'@fireblocks/recovery-relay': minor
---

execute web requests through main process instead of renderer for SOL and BSV
6 changes: 6 additions & 0 deletions .changeset/stupid-forks-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@fireblocks/recovery-utility': minor
'@fireblocks/recovery-shared': minor
---

export NCW master wallet from recovery to workspace
5 changes: 5 additions & 0 deletions .changeset/tame-icons-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-utility': minor
---

remove log flooding print
5 changes: 5 additions & 0 deletions .changeset/unlucky-horses-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

fix error due to bigint in info call
5 changes: 5 additions & 0 deletions .changeset/violet-comics-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/recovery-relay': minor
---

fixed btc relay wallet to use overwritten broadcast function in case available
5 changes: 5 additions & 0 deletions .changeset/weak-paws-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/e2e-tests': minor
---

allowed for alternative to address in tests
29 changes: 27 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,33 @@ No member of Fireblocks will ask for such information of you, and in the event w
We have setup issue templates for your convenience, please use them so that we can better understand what the issue is and how to best assist you.
Feature requests are welcome however we can't commit to any features.

## How to open pull requests
## Versions, Pull requests & Commits

We have setup pull request templates for your convenience, please use them for bug fixese. Note that version pull requests are only done by Fireblocks members and any pull request from a non-fireblocks member will be closed without review.
### Versions

We work in a versioned branch approach, so each new version has it's own dedicated branch, which will be deleted some time after the version has been released.

### Pull requests

We have setup pull request templates for your convenience, please use them for bug fixes. Note that version pull requests are only done by Fireblocks members and any pull request from a non-fireblocks member will be closed without review.

To open a bugfix pull request, use the following URL template:
https://github.com/fireblocks/recovery/compare/<base-branch>...<username>:recovery:<branch>?template=bug_fix_pull_request.md

Where:

- `base-branch` is some open version branch (_vX.Y.Z_)
- `username` is your username
- `branch` is the branch name in your fork. We recommend creating a branch in the following format: _vX.Y.Z-<FIX>_ where `FIX` is some short word aobut the bug fix (for example btc-sign-tx, evm-derivation, etc...)

### Commits

When creating a fix to be pulled, before actually committing the changes to your branch, make sure to always run `yarn changeset`.
Once ran you will be presented with several prompts, just follow the on screen instructions.
For more information about this please see the [changesets repo](https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md).

Lastly, we try to enforce [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) - please try to use it.
For VSCode we suggest the extension [Conventional Commits](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits).

## Styling

Expand All @@ -24,6 +48,7 @@ We provide a quick summary of styling we want code to use as part of the repo, p
1. File names:
1. For assets - name the containing folder as the asset's ID / symbol (Ethereum = ETH, Bitcoin = BTC, etc...), the main file will be `index.ts`
2. For files that contain TSX - file name must be `<NAME>.tsx`
3. For library functions - file name must be `<EXPALANTION>.ts`, so if the file handles CSV operations - `csv.ts`, if it gets logs, `getLogs.ts`, etc...
2. Function and variable names should use camelCase
3. Arrow functions of one line should not use brackets:

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
</a>
</p>

## Beta Warning
## Early Access

⚠️⚠️⚠️ WARNING ⚠️⚠️⚠️<br/>
This tool is currently in beta stage, it is subject to change and might contain bugs. Please use it for testing purposes only, and not for mainnet workspaces.
For the current recommended production tool please visit the [python key recovery tool](https://github.com/fireblocks/fireblocks-key-recovery-tool).
For beta access please contact your Customer Success Manager.
This tool is currently in early access state, it is subject to change and might contain bugs.

---

Expand Down
30 changes: 30 additions & 0 deletions apps/recovery-relay/components/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { ReactNode } from 'react';
import { Alert, AlertTitle } from '@mui/material';
import { LeakAdd, ImportExport, Settings } from '@mui/icons-material';
import semver from 'semver';
import {
Layout as BaseLayout,
LayoutProps as BaseLayoutProps,
AccountsIcon,
RelayRequestParams,
useOfflineQuery,
} from '@fireblocks/recovery-shared';
import packageJson from '../../package.json';
import { useWorkspace } from '../../context/Workspace';
import { WithdrawModal } from '../WithdrawModal';

Expand All @@ -29,6 +33,25 @@ export const Layout = ({ children }: Props) => {

const hasExtendedPublicKeys = !!xpub || !!fpub;

const versionQuery = useOfflineQuery({
enabled: true,
queryKey: ['utilityReleasesUrl'],
refetchOnWindowFocus: false,
refetchInterval: false,
queryFn: async () => {
const latestPackageJson = (await (
await fetch(
packageJson.repository
.replace('recovery-relay', 'recovery-utility/package.json')
.replace('github.com', 'raw.githubusercontent.com')
.replace('tree', ''),
)
).json()) as typeof packageJson;

return latestPackageJson.version;
},
});

const navLinks: BaseLayoutProps['navLinks'] = [
{
label: 'Accounts',
Expand Down Expand Up @@ -60,6 +83,13 @@ export const Layout = ({ children }: Props) => {
description='Query balances and send transactions from your recovered Fireblocks wallets'
navLinks={navLinks}
>
{!!versionQuery.data && semver.gt(versionQuery.data, packageJson.version) && (
<Alert severity='error'>
<AlertTitle style={{ lineHeight: undefined, marginBottom: 0, marginTop: 0 }}>
Version {versionQuery.data} is available, please update
</AlertTitle>
</Alert>
)}
{children}
<WithdrawModal key={getWithdrawModalKey(inboundRelayParams)} />;
</BaseLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const CreateTransaction = ({ asset, inboundRelayParams, setSignTxResponse
enabled: !!derivation,
queryFn: async () => {
logger.debug(`Querying prepare transaction ${toAddress}`);
return derivation!.prepare?.(toAddress, values.memo);
return await derivation!.prepare?.(toAddress, values.memo);
},
onSuccess: (prepare: AccountData) => {
logger.info('UTXOs', prepare.utxos);
Expand Down Expand Up @@ -175,7 +175,11 @@ export const CreateTransaction = ({ asset, inboundRelayParams, setSignTxResponse
values,
asset,
derivation: sanatize(derivation),
prepare: prepareQuery.data,
prepare: JSON.stringify(
prepareQuery.data,
(_, v) => (typeof v === 'bigint' ? v.toString() : typeof v === 'function' ? 'function' : v),
2,
),
});

return (
Expand Down
Loading