Skip to content

Commit

Permalink
Standardize on the 'resupplyable' spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
gevorgvoskanyan committed Feb 24, 2025
1 parent b4b4805 commit edf226f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/qt/forms/myownspats.ui
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</column>
<column>
<property name="text">
<string>Resuppliable</string>
<string>Resupplyable</string>
</property>
</column>
<column>
Expand Down
6 changes: 3 additions & 3 deletions src/qt/myownspats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ void MyOwnSpats::onMintButtonClicked()
assert( wallet_model_ );
if ( const auto row = get_the_selected_row() ) {
try {
const bool resuppliable = ui_->tableWidgetMyOwnSpats->item( *row, ColumnResupplyable )->text() == "Yes";
if ( !resuppliable )
throw std::domain_error( "Cannot mint for a non-resuppliable asset!" );
const bool resupplyable = ui_->tableWidgetMyOwnSpats->item( *row, ColumnResupplyable )->text() == "Yes";
if ( !resupplyable )
throw std::domain_error( "Cannot mint for a non-resupplyable asset!" );
const spats::asset_type_t asset_type{ ui_->tableWidgetMyOwnSpats->item( *row, ColumnAssetType )->text().toULongLong() };
assert( is_fungible_asset_type( asset_type ) );
const auto &asset = my_own_assets_map_.at( spats::universal_asset_id_t{ asset_type, {} } );
Expand Down
2 changes: 1 addition & 1 deletion src/spats/base_asset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ constexpr auto initial_admin_public_address = "<TODO find out>"sv;
constexpr supply_amount_t initial_supply{ MAX_MONEY, 8 };
static_assert( initial_supply.unpack() == std::pair< std::uint64_t, std::uint64_t >( 21'000'000, 0 ) );

constexpr bool resuppliable = false;
constexpr bool resupplyable = false;

} // namespace base
} // namespace spats
Expand Down
2 changes: 1 addition & 1 deletion src/spats/modification.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class BasicAssetModification : public AssetModificationBase {
if ( old_asset.total_supply() != new_asset.total_supply() )
throw std::domain_error( "Spark asset's total supply cannot be modified via a regular modification operation - use Mint or Burn operations instead" );
if ( old_asset.resupplyable() != new_asset.resupplyable() )
throw std::domain_error( "Spark asset's resuppliability cannot be modified" );
throw std::domain_error( "Spark asset's resupplyability cannot be modified" );
assert( apply_on( FungibleSparkAsset( old_asset ) ) == new_asset );
assert( this->new_asset() == new_asset );
}
Expand Down
2 changes: 1 addition & 1 deletion src/spats/registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void Registry::add_the_base_asset( write_lock_proof wlp )
std::string( base::metadata ),
std::string( base::initial_admin_public_address ),
base::initial_supply,
base::resuppliable },
base::resupplyable },
{}, // TODO or should this be the genesis block's hash?
wlp );
}
Expand Down
4 changes: 2 additions & 2 deletions src/spats/spark_asset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class BasicSparkAsset : public SparkAssetBase {
if ( !is_fungible_asset_type( asset_type ) )
throw std::runtime_error( "Invalid asset_type value specified for a fungible asset" );
if ( !resupplyable && !total_supply )
throw std::runtime_error( "Not allowing to create a non-resuppliable asset with 0 supply" ); // to avoid user frustration with pointless loss of money
throw std::runtime_error( "Not allowing to create a non-resupplyable asset with 0 supply" ); // to avoid user frustration with pointless loss of money
}

template < typename Stream >
Expand All @@ -152,7 +152,7 @@ class BasicSparkAsset : public SparkAssetBase {
total_supply_ = { total_supply_raw, precision };
is >> resupplyable_;
if ( !resupplyable_ && !total_supply_ )
throw std::runtime_error( "Rejecting a serialized non-resuppliable asset with 0 supply" ); // to avoid user frustration with pointless loss of money
throw std::runtime_error( "Rejecting a serialized non-resupplyable asset with 0 supply" ); // to avoid user frustration with pointless loss of money
}

template < typename Stream >
Expand Down

0 comments on commit edf226f

Please sign in to comment.