Skip to content

Commit

Permalink
DefaultPane: New default view (#1075)
Browse files Browse the repository at this point in the history
* New default view

* Default view: use noUppercase for all buttons

* Home: center pin pad

* [v0.7.0] update branch (#1074)

* LNDHub: transactions call fix

* Add missing `BITCOIN:` url scheme for iOS

* Updated versions in bug template

* Taproot: send and receive

* Taproot: add new locale strings

* Linking fixes

* Spark fixes

* handle LNURL-auth when node doesn't support it

* Lint: Security

* Spark: fix address generation

* Main pane: fix display of Tor onion

* Make sure max parts options only appear for implentations that support MPP/AMP

* Version bump: v0.6.5

* Taproot: new style for Address type selection

* LND: handle commas when setting channel fees

* Make sure Taproot support can be assessed when setting Address types

* Remove default LNDHub host

* v0.6.5: bump iOS build to 2

* CLN: createInvoice: expiry fix

* ErrorUtils: user friendly error messages

* Address select modal QA.

* Lint fix.

* Added quality assurance to PR template

* Android: NFC intent

* handleAnything: don't throw alert when filling out Send form

* Update React: 18.1.0, React Native: 0.68.2

* Remove unused react-native-animated

* OpenChannel: Remove private var as it is restricted

* OpenChannel: don't announce channels by default

* Android: set up NFC app linking

* AndroidManifest: Remove redundant NFC config

* PaymentRequest: enhance UI

* MobileTools: add credit to source

* PaymentRequest: clear store values on navigation back

* AddEditNode: add Spark QR scanner

* Locales: v0.6.5

* bump version to v0.6.5-rc1

* v0.6.5: bump iOS build to 3

* Roll back RN to 0.67.2

* v0.6.5: bump iOS build to 4

* Revert "Roll back RN to 0.67.2"

* SparkQRScanner: add React import

* v0.6.5: bump iOS build to 5

* CollapsedQR: fix color of icon on Hide/Show button

* SparkQRScanner: fix imports to include implementation

* Fix typo

* Add lndhub.io as the first custodial lndhub

It seems that BlueWallet is connecting to lndhub.io by default
and by looking at https://lndhub.io and https://lndhub.herokuapp.com
it seems these two are using the same backend

* About: add new sponsor tiers

* Locales: v0.6.5-rc2

* Version bump: v0.6.5-rc2

* Add c-lightning-REST QR scanner

* xcodeproj: v0.6.5: bump project version to 7

* Android 12: remove top margin hack

* Version bump: v0.6.5-rc3

* Update README.md

* OnchainSwippeableRow: fix animation render for receive and send actions

depends on supportsCoinControl and not supportsRouting

* SwipeableRow: fix animation width for middle action if supported

The actual value of 100 does not match with any other width animated value.
The value should be 200 because if present, the width of others is 200.

* SwipeableRow: add opacity transition for actions 

Since the routing and coins width animations are correct,
the button can appear on the right at the beginning of the swap.
Adding opacity transition hide this buttons.

* Wallet: only enable event listeners after unlock

* Locales: Missing translation labels in Help menu

* Locales: v0.6.5-rc4

* Version bump: v0.6.5-rc4

* Version bump: v0.6.5

* GitHub Actions: add prettier

* GitHub Actions: add lint

* GitHub Actions: Remove old main workflow

* Fix branches

* Add checks:write permission

* Fix link to 'Zeus over Tor guide for RaspiBolt'

* AndroidManifest.xml: Don't make NFC a requirement

Existing config leads to Google Play prevented users without NFC from being able to download the app

* Update README.md w/ new node solution

Add link to Citadel (https://runcitadel.space/) to Full Node Solutions

* Add lint workflow

* Update prettier workflow

* Bug fix: Custom block explorer url force prefixed with https:/ (#1053)

* attempted fix of issue 1051

#1051

if a custom instance of mempool.space is used 'block-height' -> 'block' translation will fail!
could we hint in the url, that it must happen?

* Handle <schema>://<ip>:<port>#mempool.space

We can now hint in a custom url to use mempool.space type path convention.
Anything behind the first # will get cut off from host, and any other value than mempool.space gets ignored.

* Handle <scheme>://<ip>:<port>#mempool.space 

fix typo: schema -> scheme

* Clarifying url host convention hint behavior

Translate 'block-height' to 'block' if:
  a) host is 'mempool.space'
  b) host is in url form ending in convention hint '#mempool.space'
Everything from the first '#' is stripped from host, other convention hints are currently completely ignored

* after prettier

* UrlUtils.ts: remove inferred type

Co-authored-by: Evan Kaloudis <[email protected]>

* Update Mortals display (#1058)

* Update splash images (#1057)

* Android: new splash screen

* Update intro splash image

* Bump nth-check and react-native-svg

Bumps [nth-check](https://github.com/fb55/nth-check) and [react-native-svg](https://github.com/react-native-community/react-native-svg). These dependencies needed to be updated together.

Updates `nth-check` from 1.0.2 to 2.1.1
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](fb55/nth-check@v1.0.2...v2.1.1)

Updates `react-native-svg` from 9.13.6 to 13.0.0
- [Release notes](https://github.com/react-native-community/react-native-svg/releases)
- [Commits](software-mansion/react-native-svg@v9.13.6...v13.0.0)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
- dependency-name: react-native-svg
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Reproducible builds (#1055)

* Simplre reproducible builds

* clone the branch you're reproducing

* fix branch/tag argument taking + use master as default

* be able to execute build.sh more than once

* Simplifiying process

* Updating rn-nodeify to 10.3.0 to avoid issue

* Deleting compile and Dockerfile as they're not used anymore

* Updated simplified build script and README file with instructions to build

* Simplify / beautify build script

* Commenting out the singning process for release in build.gradle

* Build and sign every apk

* Cut apk location up to current location for easy location of files

* Remove signing code

* Delete unused variables

* Updated instructions

* README: update reproducible instructions

* build.sh: lock in Docker image version

reactnativecommunity/react-native-android:5.4

Co-authored-by: Evan Kaloudis <[email protected]>

* Version bump: v0.6.6 (#1060)

* package.json: version bump to v0.6.6

* Android: version bump to v0.6.6

* iOS: version bump to v0.6.6

* package-lock.json: update (#1061)

* F-Droid: update metadata (#1062)

* F-Droid: update metadata

* Update featureGraphic

* Locales: v0.6.6 (#1063)

* README: update F-Droid link

* Update bug_report.yml

Add v0.6.5 + v0.6.6

* remove fallbackResource for react native 0.68 upgrade (#1066)

* style pinpad to avoid overlap on smaller screens (#1067)

* Sponsors: fix display on iPod Touch (#1070)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: benthecarman <[email protected]>
Co-authored-by: bosch <[email protected]>
Co-authored-by: bosch <[email protected]>
Co-authored-by: Pavol Rusnak <[email protected]>
Co-authored-by: Louis Aussedat <[email protected]>
Co-authored-by: Andrei <[email protected]>
Co-authored-by: sz3k <[email protected]>
Co-authored-by: moonsettler <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luis Miguel <[email protected]>
Co-authored-by: deregs <[email protected]>

* Fix styling for lower resolution devices

* DefaultPane: clear amount on unit change

* DefaultPane: limit decimal places based on units + add shake animation

* DefaultPane: add text color animation

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: benthecarman <[email protected]>
Co-authored-by: bosch <[email protected]>
Co-authored-by: bosch <[email protected]>
Co-authored-by: Pavol Rusnak <[email protected]>
Co-authored-by: Louis Aussedat <[email protected]>
Co-authored-by: Andrei <[email protected]>
Co-authored-by: sz3k <[email protected]>
Co-authored-by: moonsettler <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luis Miguel <[email protected]>
Co-authored-by: deregs <[email protected]>
  • Loading branch information
12 people authored Sep 25, 2022
1 parent e0af2d0 commit 8ad232d
Show file tree
Hide file tree
Showing 8 changed files with 388 additions and 27 deletions.
2 changes: 1 addition & 1 deletion assets/images/SVG/Bitcoin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ interface ButtonProps {
secondary?: boolean;
tertiary?: boolean;
quaternary?: boolean;
quinary?: boolean;
iconOnly?: boolean;
adaptiveWidth?: boolean;
containerStyle?: any;
buttonStyle?: any;
noUppercase?: boolean;
disabled?: boolean;
}

function Button(props: ButtonProps) {
Expand All @@ -26,11 +28,13 @@ function Button(props: ButtonProps) {
secondary,
tertiary,
quaternary,
quinary,
iconOnly,
adaptiveWidth,
containerStyle,
buttonStyle,
noUppercase
noUppercase,
disabled
} = props;

const newContainerStyle: any = adaptiveWidth
Expand Down Expand Up @@ -83,6 +87,8 @@ function Button(props: ButtonProps) {
: {
backgroundColor: iconOnly
? 'transparent'
: quinary
? themeColor('secondary')
: quaternary
? themeColor('background')
: tertiary
Expand All @@ -101,6 +107,8 @@ function Button(props: ButtonProps) {
}
: {
color: iconOnly
? themeColor('text')
: quinary
? themeColor('text')
: quaternary
? themeColor('text')
Expand All @@ -113,6 +121,7 @@ function Button(props: ButtonProps) {
}
onPress={onPress}
containerStyle={newContainerStyle}
disabled={disabled}
/>
);
}
Expand Down
76 changes: 51 additions & 25 deletions components/PinPad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface PinPadProps {
minLength?: number;
maxLength?: number;
numberHighlight?: boolean;
amount?: boolean;
}

export default function PinPad({
Expand All @@ -27,7 +28,8 @@ export default function PinPad({
hidePinLength = false,
minLength = 4,
maxLength = 8,
numberHighlight = false
numberHighlight = false,
amount = false
}: PinPadProps) {
// PinPad state only depends on pin value length, not the actual pin/amount value
// Parent component to PinPad can store pin/amount value
Expand Down Expand Up @@ -65,7 +67,7 @@ export default function PinPad({
};

return (
<View style={styles.bottom}>
<View style={styles.pad}>
<Row align="flex-end" style={styles.pinPadRow}>
<Touchable
touch={() => {
Expand Down Expand Up @@ -163,16 +165,28 @@ export default function PinPad({
</Touchable>
</Row>
<Row align="flex-end" style={styles.pinPadRow}>
<Touchable
touch={() => {
decrementPinValueLength();
deleteValue();
}}
highlight={numberHighlight}
style={styles.key}
>
<Text style={styles.pinPadNumber}>{'<'}</Text>
</Touchable>
{amount ? (
<Touchable
touch={() => {
appendValue('.');
}}
highlight={numberHighlight}
style={styles.key}
>
<Text style={styles.pinPadNumber}>{'.'}</Text>
</Touchable>
) : (
<Touchable
touch={() => {
decrementPinValueLength();
deleteValue();
}}
highlight={numberHighlight}
style={styles.key}
>
<Text style={styles.pinPadNumber}>{'<'}</Text>
</Touchable>
)}
<Touchable
touch={() => {
incrementPinValueLength();
Expand All @@ -183,18 +197,30 @@ export default function PinPad({
>
<Text style={styles.pinPadNumber}>{pinNumbers[0]}</Text>
</Touchable>
{!hidePinLength && (
<Touchable
touch={() => {
clearPinValueLength();
clearValue();
}}
highlight={numberHighlight}
style={styles.key}
>
<Text style={styles.pinPadNumber}>C</Text>
</Touchable>
)}
{!hidePinLength &&
(amount ? (
<Touchable
touch={() => {
decrementPinValueLength();
deleteValue();
}}
highlight={numberHighlight}
style={styles.key}
>
<Text style={styles.pinPadNumber}>{'<'}</Text>
</Touchable>
) : (
<Touchable
touch={() => {
clearPinValueLength();
clearValue();
}}
highlight={numberHighlight}
style={styles.key}
>
<Text style={styles.pinPadNumber}>C</Text>
</Touchable>
))}
{!!hidePinLength && pinValueLength >= minLength && (
<Touchable
touch={() => {
Expand Down Expand Up @@ -226,7 +252,7 @@ const styles = StyleSheet.create({
fontSize: 20,
fontFamily: 'Lato-Bold'
},
bottom: {
pad: {
justifyContent: 'flex-end',
marginBottom: 25
},
Expand Down
43 changes: 43 additions & 0 deletions components/UnitToggle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import * as React from 'react';
import { inject, observer } from 'mobx-react';

import Button from './../components/Button';

import UnitsStore from './../stores/UnitsStore';
import SettingsStore from './../stores/SettingsStore';

interface UnitToggleProps {
UnitsStore: UnitsStore;
SettingsStore: SettingsStore;
onToggle?: () => void;
}

@inject('UnitsStore', 'SettingsStore')
@observer
export default class UnitToggle extends React.Component<UnitToggleProps, {}> {
render() {
const { UnitsStore, SettingsStore, onToggle } = this.props;
const { changeUnits, units } = UnitsStore;
const { settings } = SettingsStore;
const { fiat } = settings;

return (
<React.Fragment>
<Button
title={units === 'fiat' ? fiat : units}
icon={{
name: 'import-export',
size: 25
}}
adaptiveWidth
quinary
noUppercase
onPress={() => {
if (onToggle) onToggle();
changeUnits();
}}
/>
</React.Fragment>
);
}
}
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"general.send": "Send",
"general.receive": "Receive",
"general.request": "Request",
"general.scan": "Scan",
"general.enableNfc": "Enable NFC",
"general.confirm": "Confirm",
Expand Down
7 changes: 7 additions & 0 deletions views/Receive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default class Receive extends React.Component<
navigation.getParam('lnurlParams');

const selectedIndex: number = navigation.getParam('selectedIndex');
const amount: string = navigation.getParam('amount');

if (lnurl) {
this.setState({
Expand All @@ -93,6 +94,12 @@ export default class Receive extends React.Component<
selectedIndex
});
}

if (amount) {
this.setState({
value: amount
});
}
}

getNewAddress = (params: any) => {
Expand Down
Loading

0 comments on commit 8ad232d

Please sign in to comment.