diff --git a/catalyst_voices/lib/pages/account/creation/task_picture.dart b/catalyst_voices/lib/pages/account/creation/task_picture.dart
new file mode 100644
index 0000000000..a6927de0c0
--- /dev/null
+++ b/catalyst_voices/lib/pages/account/creation/task_picture.dart
@@ -0,0 +1,100 @@
+import 'package:catalyst_voices_assets/catalyst_voices_assets.dart';
+import 'package:catalyst_voices_brands/catalyst_voices_brands.dart';
+import 'package:flutter/material.dart';
+
+enum TaskPictureType {
+ normal,
+ success,
+ error;
+
+ Color _foregroundColor(ThemeData theme) {
+ return switch (this) {
+ // TODO(damian-molinski): Color should come from colors scheme
+ TaskPictureType.normal => const Color(0xFF0C288D),
+ TaskPictureType.success => theme.colors.successContainer!,
+ TaskPictureType.error => theme.colors.errorContainer!,
+ };
+ }
+
+ Color _backgroundColor(ThemeData theme) {
+ return switch (this) {
+ // TODO(damian-molinski): Color should come from colors scheme
+ TaskPictureType.normal => const Color(0xFFCCE2FF),
+ TaskPictureType.success => theme.colors.success!,
+ TaskPictureType.error => theme.colorScheme.error,
+ };
+ }
+}
+
+class TaskKeychainPicture extends StatelessWidget {
+ final TaskPictureType type;
+
+ const TaskKeychainPicture({
+ super.key,
+ this.type = TaskPictureType.normal,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return TaskPicture(
+ child: TaskPictureIconBox(
+ type: type,
+ child: VoicesAssets.images.keychain.buildIcon(allowSize: false),
+ ),
+ );
+ }
+}
+
+class TaskPicture extends StatelessWidget {
+ final Widget child;
+
+ const TaskPicture({
+ super.key,
+ required this.child,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Stack(
+ alignment: Alignment.topRight,
+ children: [
+ CatalystImage.asset(VoicesAssets.images.taskIllustration.path),
+ child,
+ ],
+ );
+ }
+}
+
+class TaskPictureIconBox extends StatelessWidget {
+ final TaskPictureType type;
+ final Widget child;
+
+ const TaskPictureIconBox({
+ super.key,
+ this.type = TaskPictureType.normal,
+ required this.child,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = Theme.of(context);
+
+ final foregroundColor = type._foregroundColor(theme);
+ final backgroundColor = type._backgroundColor(theme);
+
+ final iconThemeData = IconThemeData(color: foregroundColor);
+
+ return IconTheme(
+ data: iconThemeData,
+ child: Container(
+ constraints: BoxConstraints.tight(const Size.square(125)),
+ decoration: BoxDecoration(
+ color: backgroundColor,
+ shape: BoxShape.circle,
+ ),
+ alignment: Alignment.center,
+ child: child,
+ ),
+ );
+ }
+}
diff --git a/catalyst_voices/lib/pages/workspace/workspace_page.dart b/catalyst_voices/lib/pages/workspace/workspace_page.dart
index ae19d06783..96de89afa6 100644
--- a/catalyst_voices/lib/pages/workspace/workspace_page.dart
+++ b/catalyst_voices/lib/pages/workspace/workspace_page.dart
@@ -3,8 +3,6 @@ import 'package:catalyst_voices/pages/workspace/proposal_navigation_panel.dart';
import 'package:catalyst_voices/pages/workspace/proposal_segment_controller.dart';
import 'package:catalyst_voices/pages/workspace/proposal_setup_panel.dart';
import 'package:catalyst_voices/pages/workspace/sample_rich_text.dart';
-import 'package:catalyst_voices/pages/workspace/sample_rich_text2.dart';
-import 'package:catalyst_voices/pages/workspace/sample_rich_text3.dart';
import 'package:catalyst_voices/widgets/widgets.dart';
import 'package:catalyst_voices_models/catalyst_voices_models.dart';
import 'package:flutter/material.dart';
@@ -17,31 +15,12 @@ final _proposalNavigation = WorkspaceProposalNavigation(
WorkspaceProposalSetup(
id: _setupSegmentId,
steps: [
- const WorkspaceProposalSegmentStep(
- id: 0,
- title: 'Title',
- description: 'F14 / Promote Social Entrepreneurs and a '
- 'longer title up-to 60 characters',
- isEditable: true,
- ),
WorkspaceProposalSegmentStep(
- id: 1,
+ id: 0,
title: 'Rich text',
document: Document.fromJson(sampleRichText),
isEditable: true,
),
- WorkspaceProposalSegmentStep(
- id: 2,
- title: 'Other topic',
- document: Document.fromJson(sampleRichText2),
- isEditable: false,
- ),
- WorkspaceProposalSegmentStep(
- id: 3,
- title: 'Other topic',
- document: Document.fromJson(sampleRichText3),
- isEditable: false,
- ),
],
),
],
diff --git a/catalyst_voices/lib/widgets/rich_text/voices_rich_text.dart b/catalyst_voices/lib/widgets/rich_text/voices_rich_text.dart
index 697060c9c5..af4ee01f1f 100644
--- a/catalyst_voices/lib/widgets/rich_text/voices_rich_text.dart
+++ b/catalyst_voices/lib/widgets/rich_text/voices_rich_text.dart
@@ -150,7 +150,7 @@ class _Editor extends StatelessWidget {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: ResizableBoxParent(
- minHeight: 320,
+ minHeight: 470,
resizableVertically: true,
resizableHorizontally: false,
child: DecoratedBox(
diff --git a/catalyst_voices/packages/catalyst_voices_assets/assets/images/2.0x/task_illustration.webp b/catalyst_voices/packages/catalyst_voices_assets/assets/images/2.0x/task_illustration.webp
new file mode 100644
index 0000000000..c55e59b9ff
Binary files /dev/null and b/catalyst_voices/packages/catalyst_voices_assets/assets/images/2.0x/task_illustration.webp differ
diff --git a/catalyst_voices/packages/catalyst_voices_assets/assets/images/3.0x/task_illustration.webp b/catalyst_voices/packages/catalyst_voices_assets/assets/images/3.0x/task_illustration.webp
new file mode 100644
index 0000000000..afaaa67d4f
Binary files /dev/null and b/catalyst_voices/packages/catalyst_voices_assets/assets/images/3.0x/task_illustration.webp differ
diff --git a/catalyst_voices/packages/catalyst_voices_assets/assets/images/keychain.svg b/catalyst_voices/packages/catalyst_voices_assets/assets/images/keychain.svg
new file mode 100644
index 0000000000..5c04db0777
--- /dev/null
+++ b/catalyst_voices/packages/catalyst_voices_assets/assets/images/keychain.svg
@@ -0,0 +1,22 @@
+
diff --git a/catalyst_voices/packages/catalyst_voices_assets/assets/images/task_illustration.webp b/catalyst_voices/packages/catalyst_voices_assets/assets/images/task_illustration.webp
new file mode 100644
index 0000000000..86db01c353
Binary files /dev/null and b/catalyst_voices/packages/catalyst_voices_assets/assets/images/task_illustration.webp differ
diff --git a/catalyst_voices/packages/catalyst_voices_assets/lib/generated/assets.gen.dart b/catalyst_voices/packages/catalyst_voices_assets/lib/generated/assets.gen.dart
index 6746029a03..5cc53869b2 100644
--- a/catalyst_voices/packages/catalyst_voices_assets/lib/generated/assets.gen.dart
+++ b/catalyst_voices/packages/catalyst_voices_assets/lib/generated/assets.gen.dart
@@ -1203,6 +1203,9 @@ class $AssetsImagesGen {
SvgGenImage get fallbackLogoIcon =>
const SvgGenImage('assets/images/fallback_logo_icon.svg');
+ /// File path: assets/images/keychain.svg
+ SvgGenImage get keychain => const SvgGenImage('assets/images/keychain.svg');
+
/// File path: assets/images/linkedin.svg
SvgGenImage get linkedin => const SvgGenImage('assets/images/linkedin.svg');
@@ -1218,6 +1221,10 @@ class $AssetsImagesGen {
AssetGenImage get proposalBackground2 =>
const AssetGenImage('assets/images/proposal_background_2.webp');
+ /// File path: assets/images/task_illustration.webp
+ AssetGenImage get taskIllustration =>
+ const AssetGenImage('assets/images/task_illustration.webp');
+
/// File path: assets/images/x.svg
SvgGenImage get x => const SvgGenImage('assets/images/x.svg');
@@ -1238,10 +1245,12 @@ class $AssetsImagesGen {
facebookMono,
fallbackLogo,
fallbackLogoIcon,
+ keychain,
linkedin,
linkedinMono,
proposalBackground1,
proposalBackground2,
+ taskIllustration,
x,
xMono
];
diff --git a/catalyst_voices/packages/catalyst_voices_assets/lib/generated/colors.gen.dart b/catalyst_voices/packages/catalyst_voices_assets/lib/generated/colors.gen.dart
index 39255c360d..8932c457c8 100644
--- a/catalyst_voices/packages/catalyst_voices_assets/lib/generated/colors.gen.dart
+++ b/catalyst_voices/packages/catalyst_voices_assets/lib/generated/colors.gen.dart
@@ -227,7 +227,7 @@ class VoicesColors {
static const Color lightAvatarsWarning = Color(0xFFFDE1CE);
/// Color: #FFFFFF
- static const Color lightElevationsOnSurfaceNeutralLv0 = Color(0x16123CD3);
+ static const Color lightElevationsOnSurfaceNeutralLv0 = Color(0xFFFFFFFF);
/// Color: #F2F4F8
static const Color lightElevationsOnSurfaceNeutralLv1Grey = Color(0xFFF2F4F8);
diff --git a/catalyst_voices/packages/catalyst_voices_assets/lib/src/assets_ext.dart b/catalyst_voices/packages/catalyst_voices_assets/lib/src/assets_ext.dart
index a52047b0e2..74eb0768b2 100644
--- a/catalyst_voices/packages/catalyst_voices_assets/lib/src/assets_ext.dart
+++ b/catalyst_voices/packages/catalyst_voices_assets/lib/src/assets_ext.dart
@@ -81,6 +81,7 @@ extension SvgGenImageExt on SvgGenImage {
String? semanticsLabel,
bool excludeFromSemantics = false,
double? size,
+ bool allowSize = true,
BoxFit fit = BoxFit.contain,
Alignment alignment = Alignment.center,
bool matchTextDirection = false,
@@ -105,6 +106,7 @@ extension SvgGenImageExt on SvgGenImage {
semanticsLabel: semanticsLabel,
excludeFromSemantics: excludeFromSemantics,
size: size,
+ allowSize: allowSize,
fit: fit,
alignment: alignment,
matchTextDirection: matchTextDirection,
diff --git a/catalyst_voices/packages/catalyst_voices_assets/lib/src/catalyst_svg_icon.dart b/catalyst_voices/packages/catalyst_voices_assets/lib/src/catalyst_svg_icon.dart
index 88a827dfeb..0a9b094c8b 100644
--- a/catalyst_voices/packages/catalyst_voices_assets/lib/src/catalyst_svg_icon.dart
+++ b/catalyst_voices/packages/catalyst_voices_assets/lib/src/catalyst_svg_icon.dart
@@ -10,6 +10,9 @@ class CatalystSvgIcon extends StatelessWidget {
/// See [SvgPicture.width] and [SvgPicture.height]
final double? size;
+ /// Whether [size] can be applied to final widget.
+ final bool allowSize;
+
/// See [SvgPicture.fit]
final BoxFit fit;
@@ -54,6 +57,7 @@ class CatalystSvgIcon extends StatelessWidget {
this.bytesLoader, {
super.key,
this.size,
+ this.allowSize = true,
this.fit = BoxFit.contain,
this.alignment = Alignment.center,
this.matchTextDirection = false,
@@ -77,6 +81,7 @@ class CatalystSvgIcon extends StatelessWidget {
String? package = 'catalyst_voices_assets',
SvgTheme? theme,
this.size,
+ this.allowSize = true,
this.fit = BoxFit.contain,
this.alignment = Alignment.center,
this.matchTextDirection = false,
@@ -101,7 +106,7 @@ class CatalystSvgIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
- final effectiveSize = size ?? IconTheme.of(context).size;
+ final effectiveSize = allowSize ? size ?? IconTheme.of(context).size : null;
final effectiveColorFilter = allowColorFilter
? _colorFilter ?? IconTheme.of(context).asColorFilter()
: null;
diff --git a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/README.md b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/README.md
index b089a8e850..af110d7dab 100644
--- a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/README.md
+++ b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/README.md
@@ -101,13 +101,14 @@ Future main() async {
}
Transaction _buildUnsignedTx({
- required List utxos,
+ required Set utxos,
required ShelleyAddress changeAddress,
}) {
const txBuilderConfig = TransactionBuilderConfig(
- feeAlgo: LinearFee(
- constant: Coin(155381),
- coefficient: Coin(44),
+ feeAlgo: TieredFee(
+ constant: 155381,
+ coefficient: 44,
+ refScriptByteCost: 15,
),
maxTxSize: 16384,
maxValueSize: 5000,
diff --git a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/main.dart b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/main.dart
index a3fd2f5c2c..0e99f9d7d3 100644
--- a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/main.dart
+++ b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/main.dart
@@ -238,7 +238,7 @@ class _WalletDetailsState extends State<_WalletDetails> {
List? _rewardAddresses;
List? _unusedAddresses;
List? _usedAddresses;
- List? _utxos;
+ Set? _utxos;
PubDRepKey? _pubDRepKey;
List? _registeredPubStakeKeys;
List? _unregisteredPubStakeKeys;
@@ -450,7 +450,7 @@ String _formatBalance(Balance? balance) {
return buffer.toString();
}
-String _formatUtxos(List? utxos) {
+String _formatUtxos(Set? utxos) {
if (utxos == null) {
return '---';
}
diff --git a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/sign_and_submit_rbac_tx.dart b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/sign_and_submit_rbac_tx.dart
index 5ad2c02bd6..ac34dc1ab6 100644
--- a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/sign_and_submit_rbac_tx.dart
+++ b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/sign_and_submit_rbac_tx.dart
@@ -75,7 +75,7 @@ Future _signAndSubmitRbacTx({
}
Future> _buildMetadataEnvelope({
- required List utxos,
+ required Set utxos,
required ShelleyAddress rewardAddress,
}) async {
final seed = List.generate(
@@ -152,7 +152,7 @@ Future> _buildMetadataEnvelope({
}
Transaction _buildUnsignedRbacTx({
- required List inputs,
+ required Set inputs,
required ShelleyAddress changeAddress,
required ShelleyAddress rewardAddress,
required AuxiliaryData auxiliaryData,
diff --git a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/sign_and_submit_tx.dart b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/sign_and_submit_tx.dart
index 47a07f8fd2..a92f886e61 100644
--- a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/sign_and_submit_tx.dart
+++ b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano/example/lib/sign_and_submit_tx.dart
@@ -47,7 +47,7 @@ Future _signAndSubmitTx({
}
Transaction _buildUnsignedTx({
- required List utxos,
+ required Set utxos,
required ShelleyAddress changeAddress,
}) {
/* cSpell:disable */
@@ -81,9 +81,10 @@ Transaction _buildUnsignedTx({
TransactionBuilderConfig _buildTransactionBuilderConfig() {
return const TransactionBuilderConfig(
- feeAlgo: LinearFee(
- constant: Coin(155381),
- coefficient: Coin(44),
+ feeAlgo: TieredFee(
+ constant: 155381,
+ coefficient: 44,
+ refScriptByteCost: 15,
),
maxTxSize: 16384,
maxValueSize: 5000,
diff --git a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano_platform_interface/lib/src/cardano_wallet.dart b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano_platform_interface/lib/src/cardano_wallet.dart
index 46ad60abd7..5ae71169b5 100644
--- a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano_platform_interface/lib/src/cardano_wallet.dart
+++ b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano_platform_interface/lib/src/cardano_wallet.dart
@@ -116,7 +116,7 @@ abstract interface class CardanoWalletApi {
/// specified in amount, and if this cannot be attained,
/// null shall be returned. The results can be further paginated by
/// [paginate] if it is not null.
- Future> getUtxos({
+ Future> getUtxos({
Balance? amount,
Paginate? paginate,
});
diff --git a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano_web/lib/src/interop/catalyst_cardano_wallet_proxy.dart b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano_web/lib/src/interop/catalyst_cardano_wallet_proxy.dart
index 77f1ca0b18..025232180f 100644
--- a/catalyst_voices_packages/catalyst_cardano/catalyst_cardano_web/lib/src/interop/catalyst_cardano_wallet_proxy.dart
+++ b/catalyst_voices_packages/catalyst_cardano/catalyst_cardano_web/lib/src/interop/catalyst_cardano_wallet_proxy.dart
@@ -171,7 +171,7 @@ class JSCardanoWalletApiProxy implements CardanoWalletApi {
}
@override
- Future> getUtxos({
+ Future> getUtxos({
Balance? amount,
Paginate? paginate,
}) async {
@@ -183,7 +183,7 @@ class JSCardanoWalletApiProxy implements CardanoWalletApi {
paginate != null ? JSPaginate.fromDart(paginate) : makeUndefined(),
);
- if (utxos == null) return [];
+ if (utxos == null) return {};
return await utxos.toDart.then(
(array) => array.toDart
@@ -192,7 +192,7 @@ class JSCardanoWalletApiProxy implements CardanoWalletApi {
cbor.decode(hex.decode(item.toDart)),
),
)
- .toList(),
+ .toSet(),
);
} catch (ex) {
throw _mapApiException(ex) ??
diff --git a/catalyst_voices_packages/catalyst_cardano_serialization/README.md b/catalyst_voices_packages/catalyst_cardano_serialization/README.md
index 4cb692b5d5..8188f53185 100644
--- a/catalyst_voices_packages/catalyst_cardano_serialization/README.md
+++ b/catalyst_voices_packages/catalyst_cardano_serialization/README.md
@@ -52,9 +52,10 @@ import 'package:convert/convert.dart';
/* cSpell:disable */
void main() {
const txBuilderConfig = TransactionBuilderConfig(
- feeAlgo: LinearFee(
- constant: Coin(155381),
- coefficient: Coin(44),
+ feeAlgo: TieredFee(
+ constant: 155381,
+ coefficient: 44,
+ refScriptByteCost: 0,
),
maxTxSize: 16384,
maxValueSize: 5000,
diff --git a/catalyst_voices_packages/catalyst_cardano_serialization/example/main.dart b/catalyst_voices_packages/catalyst_cardano_serialization/example/main.dart
index bb01322031..6183e5010f 100644
--- a/catalyst_voices_packages/catalyst_cardano_serialization/example/main.dart
+++ b/catalyst_voices_packages/catalyst_cardano_serialization/example/main.dart
@@ -7,9 +7,10 @@ import 'package:convert/convert.dart';
/* cSpell:disable */
void main() {
const txBuilderConfig = TransactionBuilderConfig(
- feeAlgo: LinearFee(
- constant: Coin(155381),
- coefficient: Coin(44),
+ feeAlgo: TieredFee(
+ constant: 155381,
+ coefficient: 44,
+ refScriptByteCost: 15,
),
maxTxSize: 16384,
maxValueSize: 5000,
@@ -58,7 +59,7 @@ void main() {
final txBuilder = TransactionBuilder(
config: txBuilderConfig,
- inputs: [utxo],
+ inputs: {utxo},
// fee can be left empty so that it's auto calculated or can be hardcoded
// fee: const Coin(1000000),
ttl: const SlotBigNum(410021),
diff --git a/catalyst_voices_packages/catalyst_cardano_serialization/lib/src/builders/transaction_builder.dart b/catalyst_voices_packages/catalyst_cardano_serialization/lib/src/builders/transaction_builder.dart
index 96d071ace6..9d53004f9a 100644
--- a/catalyst_voices_packages/catalyst_cardano_serialization/lib/src/builders/transaction_builder.dart
+++ b/catalyst_voices_packages/catalyst_cardano_serialization/lib/src/builders/transaction_builder.dart
@@ -19,7 +19,7 @@ final class TransactionBuilder extends Equatable {
///
/// Enough [inputs] must be provided to be greater or equal
/// the amount of [outputs] + [fee].
- final List inputs;
+ final Set inputs;
/// The list of transaction outputs which describes which address
/// will receive what amount of [Coin].
@@ -64,7 +64,7 @@ final class TransactionBuilder extends Equatable {
final Coin? totalCollateral;
/// Reference inputs as nonempty set of transaction inputs.
- final Set? referenceInputs;
+ final Set? referenceInputs;
/// The builder that builds the witness set of the transaction.
///
@@ -249,7 +249,7 @@ final class TransactionBuilder extends Equatable {
Coin minFee() {
final txBody = _copyWith(fee: const Coin(Numbers.intMaxValue)).buildBody();
final fullTx = buildFakeTransaction(txBody);
- return config.feeAlgo.minNoScriptFee(fullTx);
+ return config.feeAlgo.minFee(fullTx, {...inputs, ...?referenceInputs});
}
@override
@@ -521,7 +521,7 @@ final class TransactionBuilder extends Equatable {
networkId: networkId,
collateralReturn: collateralReturn,
totalCollateral: totalCollateral,
- referenceInputs: referenceInputs,
+ referenceInputs: referenceInputs?.map((utxo) => utxo.input).toSet(),
);
}
@@ -555,7 +555,7 @@ final class TransactionBuilder extends Equatable {
/// protocol parameters and other constants.
final class TransactionBuilderConfig extends Equatable {
/// The protocol parameter which describes the transaction fee algorithm.
- final LinearFee feeAlgo;
+ final TieredFee feeAlgo;
/// The protocol parameter which limits the maximum transaction size in bytes.
final int maxTxSize;
diff --git a/catalyst_voices_packages/catalyst_cardano_serialization/lib/src/exceptions.dart b/catalyst_voices_packages/catalyst_cardano_serialization/lib/src/exceptions.dart
index fb27c13362..f809d27d54 100644
--- a/catalyst_voices_packages/catalyst_cardano_serialization/lib/src/exceptions.dart
+++ b/catalyst_voices_packages/catalyst_cardano_serialization/lib/src/exceptions.dart
@@ -190,3 +190,21 @@ final class InsufficientAdaForAssetsException extends Equatable
@override
List