-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Enhance the Rosen app's source code by reorganizing, relocating,…
… and renaming certain files and methods
- Loading branch information
Showing
27 changed files
with
193 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rosen-bridge/rosen-app': patch | ||
--- | ||
|
||
Enhance the Rosen app's source code by reorganizing, relocating, and renaming certain files and methods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { BitcoinIcon } from '@rosen-bridge/icons'; | ||
import { NETWORK_LABELS, NETWORKS } from '@rosen-ui/constants'; | ||
import { xdefiWalletCreator } from '@rosen-ui/xdefi-wallet'; | ||
|
||
import { unwrap } from '@/_safeServerAction'; | ||
import { getTokenMap } from '@/_tokenMap/getClientTokenMap'; | ||
import { BitcoinNetwork as BitcoinNetworkType } from '@/_types'; | ||
|
||
import { getMaxTransfer } from './getMaxTransfer'; | ||
import { | ||
generateOpReturnData, | ||
generateUnsignedTx, | ||
submitTransaction, | ||
getAddressBalance, | ||
} from './server'; | ||
|
||
const config = { | ||
getTokenMap, | ||
generateOpReturnData: unwrap(generateOpReturnData), | ||
generateUnsignedTx: unwrap(generateUnsignedTx), | ||
getAddressBalance: unwrap(getAddressBalance), | ||
submitTransaction: unwrap(submitTransaction), | ||
}; | ||
|
||
/** | ||
* the main object for Bitcoin network | ||
* providing access to network info and wallets and network specific | ||
* functionality | ||
*/ | ||
export const BitcoinNetwork: BitcoinNetworkType = { | ||
name: NETWORKS.BITCOIN, | ||
label: NETWORK_LABELS.BITCOIN, | ||
logo: BitcoinIcon, | ||
wallets: [xdefiWalletCreator(config)], | ||
nextHeightInterval: 1, | ||
lockAddress: process.env.NEXT_PUBLIC_BITCOIN_LOCK_ADDRESS!, | ||
getMaxTransfer: unwrap(getMaxTransfer), | ||
toSafeAddress: (address) => address, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1 @@ | ||
import { BitcoinIcon } from '@rosen-bridge/icons'; | ||
import { NETWORK_LABELS, NETWORKS } from '@rosen-ui/constants'; | ||
import { xdefiWalletCreator } from '@rosen-ui/xdefi-wallet'; | ||
|
||
import { unwrap } from '@/_safeServerAction'; | ||
import { BitcoinNetwork as BitcoinNetworkType } from '@/_types'; | ||
|
||
import { getTokenMap } from '../getTokenMap.client'; | ||
import { getMaxTransfer } from './getMaxTransfer'; | ||
import { | ||
generateOpReturnData, | ||
generateUnsignedTx, | ||
submitTransaction, | ||
getAddressBalance, | ||
} from './server'; | ||
|
||
const config = { | ||
getTokenMap, | ||
generateOpReturnData: unwrap(generateOpReturnData), | ||
generateUnsignedTx: unwrap(generateUnsignedTx), | ||
getAddressBalance: unwrap(getAddressBalance), | ||
submitTransaction: unwrap(submitTransaction), | ||
}; | ||
|
||
/** | ||
* the main object for Bitcoin network | ||
* providing access to network info and wallets and network specific | ||
* functionality | ||
*/ | ||
export const BitcoinNetwork: BitcoinNetworkType = { | ||
name: NETWORKS.BITCOIN, | ||
label: NETWORK_LABELS.BITCOIN, | ||
logo: BitcoinIcon, | ||
wallets: [xdefiWalletCreator(config)], | ||
nextHeightInterval: 1, | ||
lockAddress: process.env.NEXT_PUBLIC_BITCOIN_LOCK_ADDRESS!, | ||
getMaxTransfer: unwrap(getMaxTransfer), | ||
toSafeAddress: (address) => address, | ||
}; | ||
export * from './client'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { CardanoIcon } from '@rosen-bridge/icons'; | ||
import { NETWORK_LABELS, NETWORKS } from '@rosen-ui/constants'; | ||
import { eternlWalletCreator } from '@rosen-ui/eternl-wallet'; | ||
import { flintWalletCreator } from '@rosen-ui/flint-wallet'; | ||
import { laceWalletCreator } from '@rosen-ui/lace-wallet'; | ||
import { namiWalletCreator } from '@rosen-ui/nami-wallet'; | ||
|
||
import { unwrap } from '@/_safeServerAction'; | ||
import { getTokenMap } from '@/_tokenMap/getClientTokenMap'; | ||
import { CardanoNetwork as CardanoNetworkType } from '@/_types'; | ||
|
||
import { getMaxTransfer } from './getMaxTransfer'; | ||
import { | ||
decodeWasmValue, | ||
generateLockAuxiliaryData, | ||
generateUnsignedTx, | ||
setTxWitnessSet, | ||
} from './server'; | ||
|
||
const config = { | ||
getTokenMap, | ||
decodeWasmValue: unwrap(decodeWasmValue), | ||
generateLockAuxiliaryData: unwrap(generateLockAuxiliaryData), | ||
generateUnsignedTx: unwrap(generateUnsignedTx), | ||
setTxWitnessSet: unwrap(setTxWitnessSet), | ||
}; | ||
|
||
/** | ||
* the main object for Cardano network | ||
* providing access to network info and wallets and network specific | ||
* functionality | ||
*/ | ||
export const CardanoNetwork: CardanoNetworkType = { | ||
name: NETWORKS.CARDANO, | ||
label: NETWORK_LABELS.CARDANO, | ||
wallets: [ | ||
eternlWalletCreator(config), | ||
flintWalletCreator(config), | ||
laceWalletCreator(config), | ||
namiWalletCreator(config), | ||
], | ||
nextHeightInterval: 25, | ||
logo: CardanoIcon, | ||
lockAddress: process.env.NEXT_PUBLIC_CARDANO_LOCK_ADDRESS!, | ||
getMaxTransfer: unwrap(getMaxTransfer), | ||
toSafeAddress: (address) => address, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1 @@ | ||
import { CardanoIcon } from '@rosen-bridge/icons'; | ||
import { NETWORK_LABELS, NETWORKS } from '@rosen-ui/constants'; | ||
import { eternlWalletCreator } from '@rosen-ui/eternl-wallet'; | ||
import { flintWalletCreator } from '@rosen-ui/flint-wallet'; | ||
import { laceWalletCreator } from '@rosen-ui/lace-wallet'; | ||
import { namiWalletCreator } from '@rosen-ui/nami-wallet'; | ||
|
||
import { unwrap } from '@/_safeServerAction'; | ||
import { CardanoNetwork as CardanoNetworkType } from '@/_types'; | ||
|
||
import { getTokenMap } from '../getTokenMap.client'; | ||
import { getMaxTransfer } from './getMaxTransfer'; | ||
import { | ||
decodeWasmValue, | ||
generateLockAuxiliaryData, | ||
generateUnsignedTx, | ||
setTxWitnessSet, | ||
} from './server'; | ||
|
||
const config = { | ||
getTokenMap, | ||
decodeWasmValue: unwrap(decodeWasmValue), | ||
generateLockAuxiliaryData: unwrap(generateLockAuxiliaryData), | ||
generateUnsignedTx: unwrap(generateUnsignedTx), | ||
setTxWitnessSet: unwrap(setTxWitnessSet), | ||
}; | ||
|
||
/** | ||
* the main object for Cardano network | ||
* providing access to network info and wallets and network specific | ||
* functionality | ||
*/ | ||
export const CardanoNetwork: CardanoNetworkType = { | ||
name: NETWORKS.CARDANO, | ||
label: NETWORK_LABELS.CARDANO, | ||
wallets: [ | ||
eternlWalletCreator(config), | ||
flintWalletCreator(config), | ||
laceWalletCreator(config), | ||
namiWalletCreator(config), | ||
], | ||
nextHeightInterval: 25, | ||
logo: CardanoIcon, | ||
lockAddress: process.env.NEXT_PUBLIC_CARDANO_LOCK_ADDRESS!, | ||
getMaxTransfer: unwrap(getMaxTransfer), | ||
toSafeAddress: (address) => address, | ||
}; | ||
export * from './client'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { ErgoIcon } from '@rosen-bridge/icons'; | ||
import { NETWORK_LABELS, NETWORKS } from '@rosen-ui/constants'; | ||
import { nautilusWalletCreator } from '@rosen-ui/nautilus-wallet'; | ||
|
||
import { unwrap } from '@/_safeServerAction'; | ||
import { getTokenMap } from '@/_tokenMap/getClientTokenMap'; | ||
import { ErgoNetwork as ErgoNetworkType } from '@/_types'; | ||
|
||
import { getMaxTransfer } from './getMaxTransfer'; | ||
import { generateUnsignedTx } from './server'; | ||
|
||
const config = { | ||
getTokenMap, | ||
generateUnsignedTx: unwrap(generateUnsignedTx), | ||
}; | ||
|
||
/** | ||
* the main object for Ergo network | ||
* providing access to network info and wallets and network specific | ||
* functionality | ||
*/ | ||
export const ErgoNetwork: ErgoNetworkType = { | ||
name: NETWORKS.ERGO, | ||
label: NETWORK_LABELS.ERGO, | ||
wallets: [nautilusWalletCreator(config)], | ||
logo: ErgoIcon, | ||
nextHeightInterval: 5, | ||
lockAddress: process.env.NEXT_PUBLIC_ERGO_LOCK_ADDRESS!, | ||
getMaxTransfer: unwrap(getMaxTransfer), | ||
toSafeAddress: (address) => address, | ||
}; |
Oops, something went wrong.