diff --git a/BeamWallet.xcodeproj/project.pbxproj b/BeamWallet.xcodeproj/project.pbxproj index e6159627..5735c08d 100644 --- a/BeamWallet.xcodeproj/project.pbxproj +++ b/BeamWallet.xcodeproj/project.pbxproj @@ -4204,7 +4204,7 @@ CLANG_WARN_ENUM_CONVERSION = NO; CODE_SIGN_ENTITLEMENTS = Resources/BeamWallet.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 8; + CURRENT_PROJECT_VERSION = 9; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = KNU2R94BJK; ENABLE_BITCODE = NO; @@ -4286,7 +4286,7 @@ CLANG_WARN_ENUM_CONVERSION = NO; CODE_SIGN_ENTITLEMENTS = Resources/BeamWallet.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 8; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = KNU2R94BJK; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/BeamWallet/BeamSDK/WalletModel.mm b/BeamWallet/BeamSDK/WalletModel.mm index 9c8314b3..2f8c4c99 100644 --- a/BeamWallet/BeamSDK/WalletModel.mm +++ b/BeamWallet/BeamSDK/WalletModel.mm @@ -246,30 +246,32 @@ @autoreleasepool { for (const auto& coin : utxos) { - BMUTXO *bmUTXO = [[BMUTXO alloc] init]; - bmUTXO.ID = coin.m_ID.m_Idx; - bmUTXO.stringID = [NSString stringWithUTF8String:coin.toStringID().c_str()]; - bmUTXO.amount = coin.m_ID.m_Value; - bmUTXO.realAmount = double(int64_t(coin.m_ID.m_Value)) / Rules::Coin; - bmUTXO.status = (int)coin.m_status; - bmUTXO.maturity = coin.m_maturity; - bmUTXO.confirmHeight = coin.m_confirmHeight; - bmUTXO.statusString = [GetUTXOStatusString(coin) lowercaseString]; - bmUTXO.typeString = GetUTXOTypeString(coin); - - if (coin.m_createTxId) - { - string createdTxId = to_hex(coin.m_createTxId->data(), coin.m_createTxId->size()); - bmUTXO.createTxId = [NSString stringWithUTF8String:createdTxId.c_str()]; - } - - if (coin.m_spentTxId) - { - string spentTxId = to_hex(coin.m_spentTxId->data(), coin.m_spentTxId->size()); - bmUTXO.spentTxId = [NSString stringWithUTF8String:spentTxId.c_str()]; + if(coin.m_ID.m_Type != Key::Type::Decoy) { + BMUTXO *bmUTXO = [[BMUTXO alloc] init]; + bmUTXO.ID = coin.m_ID.m_Idx; + bmUTXO.stringID = [NSString stringWithUTF8String:coin.toStringID().c_str()]; + bmUTXO.amount = coin.m_ID.m_Value; + bmUTXO.realAmount = double(int64_t(coin.m_ID.m_Value)) / Rules::Coin; + bmUTXO.status = (int)coin.m_status; + bmUTXO.maturity = coin.m_maturity; + bmUTXO.confirmHeight = coin.m_confirmHeight; + bmUTXO.statusString = [GetUTXOStatusString(coin) lowercaseString]; + bmUTXO.typeString = GetUTXOTypeString(coin); + + if (coin.m_createTxId) + { + string createdTxId = to_hex(coin.m_createTxId->data(), coin.m_createTxId->size()); + bmUTXO.createTxId = [NSString stringWithUTF8String:createdTxId.c_str()]; + } + + if (coin.m_spentTxId) + { + string spentTxId = to_hex(coin.m_spentTxId->data(), coin.m_spentTxId->size()); + bmUTXO.spentTxId = [NSString stringWithUTF8String:spentTxId.c_str()]; + } + + [bmUtxos addObject:bmUTXO]; } - - [bmUtxos addObject:bmUTXO]; } } @@ -1090,7 +1092,6 @@ } NSString* WalletModel::GetUTXOTypeString(beam::wallet::Coin coin) { - NSLog(@"%d",coin.m_ID.m_Type); switch (coin.m_ID.m_Type) { case Key::Type::Asset: