Skip to content

Commit 4cd6a26

Browse files
committed
fixes
1 parent 2176918 commit 4cd6a26

File tree

8 files changed

+29
-10
lines changed

8 files changed

+29
-10
lines changed

BeamWallet.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5008,7 +5008,7 @@
50085008
CODE_SIGN_ENTITLEMENTS = Resources/BeamWalletMasterNet.entitlements;
50095009
CODE_SIGN_IDENTITY = "iPhone Developer";
50105010
CODE_SIGN_STYLE = Automatic;
5011-
CURRENT_PROJECT_VERSION = 25;
5011+
CURRENT_PROJECT_VERSION = 26;
50125012
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
50135013
DEVELOPMENT_TEAM = KNU2R94BJK;
50145014
ENABLE_BITCODE = NO;
@@ -5088,7 +5088,7 @@
50885088
CODE_SIGN_ENTITLEMENTS = Resources/BeamWalletMasterNet.entitlements;
50895089
CODE_SIGN_IDENTITY = "iPhone Developer";
50905090
CODE_SIGN_STYLE = Automatic;
5091-
CURRENT_PROJECT_VERSION = 25;
5091+
CURRENT_PROJECT_VERSION = 26;
50925092
DEVELOPMENT_TEAM = KNU2R94BJK;
50935093
ENABLE_BITCODE = NO;
50945094
FRAMEWORK_SEARCH_PATHS = (

BeamWallet/BeamSDK/AppModel.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ -(void)setExpires:(int)hours toAddress:(NSString*)address {
12341234
{
12351235

12361236
try{
1237-
wallet->getAsync()->updateAddress(walletID, addresses[i].m_label, hours == 0 ? WalletAddress::ExpirationStatus::Never : WalletAddress::ExpirationStatus::OneDay);
1237+
wallet->getAsync()->updateAddress(walletID, addresses[i].m_label, hours == 0 ? WalletAddress::ExpirationStatus::Never : WalletAddress::ExpirationStatus::Auto);
12381238
}
12391239
catch (const std::exception& e) {
12401240
NSLog(@"setExpires failed");
@@ -1297,7 +1297,7 @@ -(void)setWalletComment:(NSString*)comment toAddress:(NSString*_Nonnull)address
12971297
if ([wAddress isEqualToString:address])
12981298
{
12991299
try{
1300-
wallet->getAsync()->updateAddress(walletID, comment.string, addresses[i].m_duration == 0 ? WalletAddress::ExpirationStatus::Never : WalletAddress::ExpirationStatus::OneDay);
1300+
wallet->getAsync()->updateAddress(walletID, comment.string, addresses[i].m_duration == 0 ? WalletAddress::ExpirationStatus::Never : WalletAddress::ExpirationStatus::Auto);
13011301
}
13021302
catch (const std::exception& e) {
13031303
NSLog(@"setExpires failed");
@@ -1659,7 +1659,7 @@ -(void)editAddress:(BMAddress*_Nonnull)address {
16591659
addresses[i].setExpirationStatus(beam::wallet::WalletAddress::ExpirationStatus::Never);
16601660
}
16611661
else{
1662-
addresses[i].setExpirationStatus(beam::wallet::WalletAddress::ExpirationStatus::OneDay);
1662+
addresses[i].setExpirationStatus(beam::wallet::WalletAddress::ExpirationStatus::Auto);
16631663
}
16641664
}
16651665
else{

BeamWallet/BeamSDK/AssetsManager.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
static NSString *assetsKey = @"assetsKeyNew";
2626

27-
NSArray *colors = @[@"#72fdff",@"#2acf1d",@"#ffbb54",@"#d885ff",@"#008eff",@"#a37dff",@"#91e300",@"#ffe75a",@"#9643ff",@"#395bff",@"#ff3b3b",@"#73ff7c",@"#ffa86c",@"#ff3abe",@"#00aee1",@"#ff5200",@"#6464ff",@"#ff7a21",@"#63afff",@"#c81f68"];
27+
NSArray *colors = @[@"#72fdff",@"#2acf1d",@"#ffbb54",@"#d885ff",@"#008eff",@"#ff746b",@"#91e300",@"#ffe75a",@"#9643ff",@"#395bff",@"#ff3b3b",@"#73ff7c",@"#ffa86c",@"#ff3abe",@"#00aee1",@"#ff5200",@"#6464ff",@"#ff7a21",@"#63afff",@"#c81f68"];
2828

2929
@implementation AssetsManager
3030

BeamWallet/Extensions/String.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,20 @@ extension String {
175175
return (formatter.string(from: NSNumber(value: value)) ?? "0.00") + " \(assetName)"
176176
}
177177

178+
static func currencyShort(value:Double, name: String) -> String {
179+
var assetName = name
180+
if assetName == "assets" {
181+
assetName = "BEAM"
182+
}
183+
if assetName.count > 10 {
184+
assetName = assetName.prefix(10) + "..."
185+
}
186+
if Settings.sharedManager().isHideAmounts {
187+
return assetName
188+
}
189+
return (formatter.string(from: NSNumber(value: value)) ?? "0.00") + " \(assetName)"
190+
}
191+
178192
func isValidUrl() -> Bool {
179193
let urlRegEx = "^(https?://)?(www\\.)?([-a-z0-9]{1,63}\\.)*?[a-z0-9][-a-z0-9]{0,61}[a-z0-9]\\.[a-z]{2,6}(/[-\\w@\\+\\.~#\\?&/=%]*)?$"
180194
let urlTest = NSPredicate(format:"SELF MATCHES %@", urlRegEx)

BeamWallet/Manager/NotificationManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class NotificationManager : NSObject {
8787
}
8888
else if (notification.type == TRANSACTION) {
8989
if let transaction = AppModel.sharedManager().transaction(byId: notification.pId) {
90-
let assetValue = String.currency(value: transaction.realAmount, name: transaction.asset.unitName)
90+
let assetValue = String.currencyShort(value: transaction.realAmount, name: transaction.asset.unitName)
9191

9292
var title = ""
9393
var detail = ""

BeamWallet/ViewControllers/Main/Notifications/NotificationItem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class NotificationItem {
4444
}
4545
else if(notification.type == TRANSACTION) {
4646
if let transaction = AppModel.sharedManager().transaction(byId: notification.pId) {
47-
let assetValue = String.currency(value: transaction.realAmount, name: transaction.asset.unitName)
47+
let assetValue = String.currencyShort(value: transaction.realAmount, name: transaction.asset.unitName)
4848

4949
if transaction.isIncome {
5050
if transaction.isFailed() || transaction.isExpired() || transaction.isCancelled() {

BeamWallet/ViewControllers/Main/QRCode/QRCodeSmallViewController.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ class QRCodeSmallViewController: BaseViewController {
7171
infoLabel.text = text
7272
}
7373
else {
74-
infoLabel.text = Localizable.shared.strings.receive_description
74+
if !AppModel.sharedManager().checkIsOwnNode() {
75+
infoLabel.text = Localizable.shared.strings.receive_description_2
76+
}
77+
else {
78+
infoLabel.text = Localizable.shared.strings.receive_description
79+
}
7580
}
7681

7782
codeView.generateCode(qrString, foregroundColor: UIColor.white, backgroundColor: UIColor.clear)

BeamWallet/ViewControllers/Main/Wallet/Cells/AssetAvailableCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class AssetAvailableCell: RippleCell {
4747

4848
if asset.locked() > 0 {
4949
lockedLabel.text = asset.isBeam() ? String.currency(value: asset.realLocked())
50-
: String.currency(value: asset.realLocked(), name: asset.unitName)
50+
: String.currencyShort(value: asset.realLocked(), name: asset.unitName)
5151

5252
lockedView.isHidden = false
5353
topOffset.constant = 18

0 commit comments

Comments
 (0)