Skip to content

Commit

Permalink
Changed Grin node
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasFlamel1 committed Nov 22, 2024
1 parent 4a3d140 commit cf4c400
Show file tree
Hide file tree
Showing 14 changed files with 64,458 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,11 @@ const SwapForm = () => {
const swapError = keepTronAccountAliveError
? keepTronAccountAliveError
: swapTransaction.fromAmountError instanceof NotEnoughBalance
? new NotEnoughBalanceSwap(swapTransaction.fromAmountError?.message)
: swapTransaction.fromAmountError ||
exchangeRatesState?.error ||
maybeTezosAccountUnrevealedAccount(swapTransaction) ||
(ptxSwapReceiveTRC20WithoutTrx?.enabled
? undefined
: maybeTronEmptyAccount(swapTransaction));
? new NotEnoughBalanceSwap(swapTransaction.fromAmountError?.message)
: swapTransaction.fromAmountError ||
exchangeRatesState?.error ||
maybeTezosAccountUnrevealedAccount(swapTransaction) ||
(ptxSwapReceiveTRC20WithoutTrx?.enabled ? undefined : maybeTronEmptyAccount(swapTransaction));

const swapWarning = swapTransaction.fromAmountWarning;
const pageState = usePageState(swapTransaction, swapError);
Expand Down
2 changes: 1 addition & 1 deletion apps/ledger-live-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 36176158
versionName "3.47.2"
versionName "3.48.0"
resValue "string", "build_config_package", "com.ledger.live"
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export function useTrustchainSdk() {
const applicationId = 16;
const hash = getEnv("USER_ID").slice(0, 5);

const name = `${platformMap[Platform.OS] ?? Platform.OS} ${Platform.Version} ${hash ? " " + hash : ""}`;
const name = `${platformMap[Platform.OS] ?? Platform.OS} ${Platform.Version} ${
hash ? " " + hash : ""
}`;
return { applicationId, name, apiBaseUrl: trustchainApiBaseUrl };
}, [trustchainApiBaseUrl]);

Expand Down
12 changes: 6 additions & 6 deletions libs/coin-modules/coin-icon/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ ${mode.toUpperCase()} ${
useAllAmount
? "MAX"
: amount.isZero()
? ""
: " " +
formatCurrencyUnit(getAccountCurrency(account).units[0], amount, {
showCode: true,
disableRounding: true,
})
? ""
: " " +
formatCurrencyUnit(getAccountCurrency(account).units[0], amount, {
showCode: true,
disableRounding: true,
})
}${recipient ? `\nTO ${recipient}` : ""}`;

export const fromTransactionRaw = (tr: TransactionRaw): Transaction => {
Expand Down
12 changes: 6 additions & 6 deletions libs/coin-modules/coin-ton/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ SEND ${
useAllAmount
? "MAX"
: amount.isZero()
? ""
: " " +
formatCurrencyUnit(getAccountCurrency(account).units[0], amount, {
showCode: true,
disableRounding: true,
})
? ""
: " " +
formatCurrencyUnit(getAccountCurrency(account).units[0], amount, {
showCode: true,
disableRounding: true,
})
}
TO ${recipient}`;

Expand Down
2 changes: 1 addition & 1 deletion libs/env/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const envDefinitions = {
},
API_GRIN_NODE: {
parser: stringParser,
def: "https://grinnode.live:3413",
def: "https://grincoin.org",
desc: "Node for Grin",
},
API_GRIN_TESTNET_NODE: {
Expand Down
2 changes: 1 addition & 1 deletion libs/ledger-live-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,4 +316,4 @@
"uuid": "^8.3.2",
"ws": "7"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ export type AppName = string;
/**
* The key used to store the application data in the device storage, is a combination of the device model ID and the application name.
*/
export type AppStorageKey =
`${Exclude<DeviceModelId, DeviceModelId.blue | DeviceModelId.nanoS>}-${AppName}`;
export type AppStorageKey = `${Exclude<
DeviceModelId,
DeviceModelId.blue | DeviceModelId.nanoS
>}-${AppName}`;

export type AppStorageType = {
appDataInfo: AppStorageInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jest.mock("@ledgerhq/live-nft/api/simplehash", () => ({
}

return Promise.resolve({
message: `${opts.refreshType === "nft" ? `NFT ${opts.tokenId}, ` : ""}Contract ${opts.contractAddress} on ${opts.chainId} refreshed`,
message: `${opts.refreshType === "nft" ? `NFT ${opts.tokenId}, ` : ""}Contract ${
opts.contractAddress
} on ${opts.chainId} refreshed`,
});
}),
}));
Expand Down
4 changes: 3 additions & 1 deletion libs/live-nft/src/api/simplehash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ export type RefreshOpts = {
* Refresh Metada of Contract or Nft using SimpleHash API.
*/
export async function refreshMetadata(opts: RefreshOpts): Promise<SimpleHashRefreshResponse> {
const url = `${getEnv("SIMPLE_HASH_API_BASE")}/nfts/refresh/${opts.chainId}/${opts.contractAddress}`;
const url = `${getEnv("SIMPLE_HASH_API_BASE")}/nfts/refresh/${opts.chainId}/${
opts.contractAddress
}`;
const { data } = await network<SimpleHashRefreshResponse>({
method: "POST",
url,
Expand Down
4 changes: 2 additions & 2 deletions libs/live-wallet/src/cloudsync/__tests__/sdk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ describe("CloudSyncSDK basics", () => {
postCounter % 3 === 0
? {}
: postCounter % 3 === 1
? { info: "lld/0.0.0" }
: { info: null };
? { info: "lld/0.0.0" }
: { info: null };
return HttpResponse.json({
status: "out-of-sync",
version: storedVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ const dummyContext: WalletSyncDataManagerResolutionContext = {
initial.id === account4unsupported.id
? throwError(() => new Error("simulate sync failure"))
: // this mock bridge will migrate 0->1 on versions
initial.id.startsWith("mock:0")
? of(acc => ({ ...acc, id: acc.id.replace("mock:0", "mock:1") }))
: of(acc => acc),
initial.id.startsWith("mock:0")
? of(acc => ({ ...acc, id: acc.id.replace("mock:0", "mock:1") }))
: of(acc => acc),
receive: () => {
throw new Error("not implemented");
},
Expand Down
4 changes: 2 additions & 2 deletions libs/trustchain/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export async function genericWithJWT<T>(
policy === "no-cache" || !initialJWT
? await auth()
: policy === "refresh"
? await refresh(initialJWT)
: initialJWT;
? await refresh(initialJWT)
: initialJWT;

return job(jwt).catch(async e => {
// JWT expiration handling: if the function fails, we will recover a valid jwt accordingly to spec. https://ledgerhq.atlassian.net/wiki/spaces/BE/pages/4207083687/TCH+Usage+documentation#JWT-expiration-handling
Expand Down
Loading

0 comments on commit cf4c400

Please sign in to comment.